WooCommerce: Hide coupon box on checkout page if a coupon is already applied

Here is a quick snippet to make things a bit less confusing for your customers in your WooCommerce store. When you enable the use of coupons, WooCommerce adds a field on the cart page, and a box notice on the checkout page.

But, if you enter a coupon in the cart page, and apply that coupon to the order, the notice is still displayed on the checkout page.

That could be confusing for your customers, and they could think that the coupon has NOT been applied, which is not correct. So, here is a snippet that will hide that box on the checkout page if a coupon has already been applied to cart:

Simply place that snippet in functions.php within your theme folder!

About the author

Remi Hey! My name is Rémi Corson, I'm a French WordPress Developer, I code stuff and I write from time to time ;-) Buy a coffee
Show your support

Related Posts

1 comment

  1. alemarengo:

    Thanks Remi!
    It works like a charm even on the latest woo version!
    Honestly, it should be included by default…

Leave a Reply