Category: eCommerce
WWPP – Add custom text to the Completed Order email for non-wholesale customers only
/** * Add custom text to the Completed Order email for non-wholesale customers only. */ add_action( ‘woocommerce_email_before_order_table’, function( $order, $sent_to_admin, $plain_text, $email ) { // Only target the Completed Order email if ( ‘customer_completed_order’ !== $email->id ) { return; }…Continue reading
Customize the WooCommerce Email Template Subject for Wholesale Customers
/** * Customize the Subject for wholesalers */ add_filter( ‘woocommerce_email_subject_customer_completed_order’, function( $subject, $order ) { if ( ! $order ) return $subject; $customer_id = $order->get_customer_id(); if ( ! $customer_id ) return $subject; $wholesale_roles = [ ‘wholesale_customer’, ‘wholesale_vip’ ]; $user =…Continue reading
Add custom text to WooCommerce Email Templates for Wholesale Customers
/** * Add custom text to the Completed Order email for wholesale customers only. */ add_action( ‘woocommerce_email_before_order_table’, function( $order, $sent_to_admin, $plain_text, $email ) { // Only target the Completed Order email if ( ‘customer_completed_order’ !== $email->id ) { return; }…Continue reading
Exclude Wholesale Customers from receiving the PDF Invoice
/** * Exclude wholesale roles from receiving the PDF Invoice attachment in emails. * * Wholesale Suite roles on this site: * – wholesale_customer (Wholesale Customer) * – wholesale_vip (Wholesale VIP) * * Plugin: WooCommerce PDF Invoices & Packing Slips…Continue reading
Topup Form
Top Up Now Player ID Buy NowContinue reading
AffiliateWP Network Stats Shortcode
/** * 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
AffiliateWP — Searchable Checkout Referrals Dropdown WPCode Description
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
Disallow Store Credit When There Is an Active Coupon in the Cart
/** * 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
Replace BigPost Checkout Postcode Field Description
(function () { var rdBigPostHelpText = ‘Enter your postcode in the field above to load available suburbs. Once loaded,’ + ‘ select the suburb-postcode combination from the list below.’; // Customise Postcode field description text here. var rdObserverStarted = false;…Continue reading