Repository › Forums › Support › WooCommerce Extended Coupon Features PRO › hidden coupon › Reply To: hidden coupon
June 25, 2020 at 8:15 pm #15932
Soft79
Keymaster
Normally our plugin will not apply an automatic coupon if it has 0% discount, bu when you use this snippet in your child theme:
add_filter( 'wjecf_coupon_has_a_value',
function( $has_a_value, $coupon) {
if ( strcasecmp( 'YOUR_ZERO_PERCENT_COUPON_CODE', $coupon->get_code() ) == 0 ) {
$has_a_value = true;
}
return $has_a_value;
}, 10, 2);it will. So create a 0% automatic coupon with the same code as in the snippet and it might just work…
(Snippet has not been tested)