This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
WooCommerce email restriction for coupons does not work. This fix corrects it. | |
Include this code snippet in your theme or plugin. | |
*/ | |
add_filter( 'woocommerce_coupon_is_valid', 'wc_riotxoa_coupon_is_valid', 10, 2 ); | |
if ( ! function_exists( 'wc_riotxoa_coupon_is_valid' ) ) { | |
function wc_riotxoa_coupon_is_valid( $result, $coupon ) { |