Wes Asbell
Wes Asbell

Reputation: 283

Woocommerce Remove Coupon Section from Checkout Page

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

Answers (2)

Reigel Gallarde
Reigel Gallarde

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

Akshay Shah
Akshay Shah

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

Related Questions