ACFW – Fraud prevention on one-time coupons

add_action( ‘woocommerce_checkout_process’, function() { $coupon_code = ‘your_coupon_code’; $billing_phone = wc_clean( wp_unslash( $_POST[‘billing_phone’] ?? ” ) ); $billing_addr1 = strtolower( wc_clean( wp_unslash( $_POST[‘billing_address_1’] ?? ” ) ) ); if ( ! WC()->cart ) { return; } $applied = array_map( ‘wc_format_coupon_code’, WC()->cart->get_applied_coupons()…Continue reading

auto sort all media grids

add_filter(‘vc_media_grid_build_query’, ‘auto_sort_all_vc_media_grids’, 999, 2); function auto_sort_all_vc_media_grids_v2($query_args, $grid_data) { // Работи само за Images режим с include if (!empty($query_args[‘include’]) && $query_args[‘post_type’] == ‘attachment’) { $ids = explode(‘,’, $query_args[‘include’]); // Взимаме ID-тата и ги сортираме по Title $sorted_ids = get_posts(array( ‘post__in’ =>…Continue reading

ALP – Fix missing custom order status options

add_filter( ‘lpfw_filter_get_settings_sections’, function( $response ) { $data = $response->get_data(); // Build options dynamically from all registered WooCommerce order statuses $status_options = array(); foreach ( wc_get_order_statuses() as $slug => $label ) { $status_options[] = array( ‘key’ => str_replace( ‘wc-‘, ”, $slug…Continue reading

Claude shop code

Shop All Products Gym wear, rugby designs & Celtic collections Category: All Gym Wear Rugby Designs Celtic Designs FeaturedPrice: Low to HighPrice: High to LowName: A to ZName: Z to ANewest First Loading products…Continue reading

BOGO Coupons to refer to original subtotal

add_filter( ‘woocommerce_coupon_validate_minimum_amount’, function ( $is_invalid, $coupon, $subtotal ) { if ( ! $is_invalid ) { return $is_invalid; } $bogo_deals = get_post_meta( $coupon->get_id(), ‘_acfw_bogo_deals’, true ); if ( empty( $bogo_deals ) ) { return $is_invalid; } $pre_bogo_subtotal = 0.0; foreach (…Continue reading

Untitled Snippet

CV. ABIMACHINARY — Bengkel Maintenance & Mesin UMKM, Perkebunan & Pertanian Beranda Tentang Kami Layanan Produk Hubungi Kami Konsultasi CV. ABIMACHINARY — MALANG, JAWA TIMUR BENGKEL MAINTENANCE& READY MESIN UMKM, Perkebunan & Pertanian Kami melayani perbaikan dan perawatan mesin produksi,…Continue reading