go to all blog posts

WooCommerce | How To Hide The Coupon Field On Checkout

25
October
2021

When using WooCommerce you man want to hide your coupon field. In this quick video Sterling runs you through disabling the coupon code field using 4 different methods:

  1. Disable store wide using WooCommerce settings.
  2. Disable the coupon field using a PHP Function.
  3. Disable the coupon field using CSS.
  4. Disable the coupon field while using Handsome Checkout.

PHP Function needed to disable coupon field on checkout

CSS Code needed to disable coupon field on checkout

3 Comments

in Blog, eLearning, Tips and Tricks, WooCommerce

Sterling
Wordpress Plugin Expert, Head of Marketing @ HandsomeWP

Comments

Janelle

Can you help me do this for just one product?

Bogdan

Hey Janelle! Thanks for your question.

Yes, absolutely.

It’ll be a bit more code and it can be optimized further, but it does the thing 🙂

To disable coupon field for just one product use the below PHP code instead.

Basically, it scans through items in the visitors cart to find your selected product ID.

And if this product ID is found, it disables the coupon.

Don’t forget to replace 999 with your desired product ID.

Cheers!

Firza Faisal

Hi Bogdan, it helped me with one product. Can you help me with 2 or 3 product disable coupon?

Leave a Reply