Repository › Forums › Support › WooCommerce Extended Coupon Features PRO › Auto Coupon with Email Address Restriction › Reply To: Auto Coupon with Email Address Restriction
February 21, 2018 at 4:14 pm
#2705
Soft79
Keymaster
By default WooCommerce doesn’t refresh the cart when changing the billing email address. If you have a coupon that is restricted by email address, you could paste this snippet in your theme’s functions.php:
//Update the cart preview when the billing email is changed by the customer
add_filter( 'woocommerce_checkout_fields', function( $checkout_fields ) {
$checkout_fields['billing']['billing_email']['class'][] = 'update_totals_on_change';
return $checkout_fields;
} );