Hide coupon box on checkout page if a coupon is already applied
-
Hi there,
is it possible to hide the coupon box/field if a coupon was entered and applied?
I have tried this one:
add_filter( 'woocommerce_coupons_enabled', 'woocommerce_coupons_enabled_checkout' ); function woocommerce_coupons_enabled_checkout( $coupons_enabled ) { global $woocommerce; if ( ! empty( $woocommerce->cart->applied_coupons ) ) { return false; } return $coupons_enabled; }
Unfortunately this didn’t work well. It hid the coupon box but I couldn’t remove the coupon any longer.
Do you have a better idea?
Thanks!
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Hide coupon box on checkout page if a coupon is already applied’ is closed to new replies.