17
votes

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.

2

2 Answers

41
votes
remove_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_coupon_form', 10 ); 

Put this in your functions.php and this should do it.

10
votes

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' );