Repository › Forums › Support › WooCommerce Extended Coupon Features PRO › WooCommerce Subscriptions Free Gift coupon not working › Reply To: WooCommerce Subscriptions Free Gift coupon not working
January 20, 2021 at 8:03 pm #17188
Soft79
Keymaster
I looked up the source code of the Subscriptions plugin and found a possible solution. Are you comfortable with pasting a PHP snippet?
add_filter(
'woocommerce_subscriptions_validate_coupon_type',
function( $validate, $coupon, $valid ) {
if ( ! $coupon->get_amount() ) {
$validate = false;
}
return $validate;
},10, 3
);
Please note I didn’t test this.