Reputation: 283
I am trying to remove the "Have a coupon" section that sits at the top of a Woocommerce checkout page (/checkout).
I would like to keep the coupon section on the Cart page, so I can't completely disable coupons, but would like it removed on the checkout page.
Any help would be greatly appreciated.
Upvotes: 21
Views: 31584
Reputation: 65284
remove_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_coupon_form', 10 );
Put this in your functions.php
and this should do it.
Upvotes: 49
Reputation: 3514
There is two way one is already given in this question by Reigel.
If it is not working below is another code:
function hide_coupon_field_on_cart( $enabled ) {
if ( is_checkout() ) {
$enabled = false;
}
return $enabled;
}
add_filter( 'woocommerce_coupons_enabled', 'hide_coupon_field_on_cart' );
Upvotes: 14