/** * Shortcode: [affwp_network_stats] * * Returns a single network stat for the logged-in affiliate. * Use multiple instances in JetEngine with your own labels. * * Attributes: * type = total_earnings (default) | own_earnings | downline_earnings * | network_count…Continue reading
add_action( ‘wp_enqueue_scripts’, function() { if ( ! function_exists( ‘is_checkout’ ) || ! is_checkout() ) { return; } wp_enqueue_style( ‘affwp-select2’ ); wp_enqueue_script( ‘affwp-select2’ ); // Hide WC Blocks floating label + chevron — Select2 replaces the UI entirely wp_add_inline_style( ‘affwp-select2’, ‘…Continue reading
/** * Hide store credit field when a regular coupon is applied. * Also removes any already-applied store credit when a coupon is added. */ // PHP: Hide store credit on AJAX checkout refresh when coupon is active add_filter( ‘acfw_is_allow_store_credits’,…Continue reading
/** * Plugin Name: AffiliateWP – Affiliate Referrals CSV Export * Description: Adds a “Download Referrals CSV” button to the Affiliate Area referrals tab. * When WooCommerce is active, the export includes full order details * (customer name, email, items…Continue reading
add_action( ‘wp_ajax_validate_vanity_code’, ‘send_vanity_coupon_request_notification’, 9 ); function send_vanity_coupon_request_notification() { if ( ! isset( $_REQUEST[‘vccNonce’] ) || ! wp_verify_nonce( $_REQUEST[‘vccNonce’], ‘request_vanity_coupon_code’ ) ) { return; } $affiliate_id = isset( $_REQUEST[‘affiliateID’] ) ? sanitize_text_field( $_REQUEST[‘affiliateID’] ) : false; $coupon_id = isset( $_REQUEST[‘couponID’] )…Continue reading
/** * Fix: Force query string format for all affiliate referral URLs. * * Part 1: Updates the in-memory settings so the portal URL generator * and affwp_get_affiliate_referral_url() both produce ?ref=value * format instead of /ref/value/ format. No database change.…Continue reading
add_action(‘init’, function () { add_rewrite_rule(‘^meta-checkout/?$’, ‘index.php?meta_checkout=1’, ‘top’); }); add_filter(‘query_vars’, function ($vars) { $vars[] = ‘meta_checkout’; return $vars; }); add_action(‘template_redirect’, function () { if (!get_query_var(‘meta_checkout’)) { return; } if (!function_exists(‘WC’) || !WC()->cart) { return; } // Clear current cart so Meta…Continue reading
/** * ============================================================ * Cart Page — Security Trust Badge Bar * ============================================================ * * PURPOSE: Adds a clean trust badge row below the “Proceed to * Checkout” button on the cart page to increase * conversion confidence. * *…Continue reading