How to Disable Coupons In WooCommerce

WooCommerce Disable CouponsDo you want to disable coupons completely in your WooCommerce store? It is important to offer coupons to your customers as a form of reward or discount for their loyalty.

However, some customers are used to coupon codes in such a way that they continuously look for them in your store. This means that your purchases will decrease, as customers will wait until the offers are available.

It is very easy to completely disable coupons. You do not need any coding skills to do this.

WooCommerce Disable Coupons

In this brief tutorial, we will share how you can completely disable coupons in your store.

But what if you just want to hide the coupon field on the cart or checkout page?

We will also share how you can hide the coupon field on the cart or checkout page using custom PHP scripts.

Let us look at how you can achieve this

Steps to Completely Disable Coupons in WooCommerce

Here are the steps you need to follow:

  1. Log into your WordPress site and access the Dashboard as the admin user.
  2. From the Dashboard menu, go to WooCommerce > Settings and click on the General
  3. Click on the ‘Enable the use of coupon codes’ checkbox. Once you disable it, customers will not be able to use coupons. This is how the setting is displayed:disable coupons

That’s all you need to do to disable coupons completely.

Hide the Coupon Code Field on the WooCommerce Cart or Checkout Page

This is how the coupon is displayed on the cart and checkout page:checkout page Coupon cart page Coupon

If you do not want to completely disable the coupons, here are the steps that you need to follow:

  1. Log into your WordPress site and access the Dashboard as the admin user.
  2. From the Dashboard menu, click on Appearance Menu > Theme Editor Menu. When the Theme Editor page is opened, look for the theme functions file where we will add the function.
  3. To remove the coupon code from the cart page, add the following code to the functions.php file:
[php]// hide coupon field on the cart page

function njengah_coupon_field_on_cart( $enabled ) {

            if ( is_cart() ) {

                        $enabled = false;

            }

            return $enabled;

}

add_filter( ‘woocommerce_coupons_enabled’, ‘njengah_coupon_field_on_cart’ );[/php]

  1. To remove the coupon code from the checkout page, add the following code to the functions.php file:
[php]// hide coupon field on the checkout page

function njengah_coupon_field_on_checkout( $enabled ) {

            if ( is_checkout() ) {

                        $enabled = false;

            }

            return $enabled;

}

add_filter( ‘woocommerce_coupons_enabled’, ‘njengah_coupon_field_on_checkout’ );[/php]

  1. This is the outcome:checkout outcome Cart outcome

Conclusion

In this post, you have learned how to completely disable WooCommerce coupons.

We have also provided a solution for you if you want to disable coupons on the checkout and cart page. This ensures that coupons are not conspicuous.

Customers will not waste time searching for them.

If you want further customization, please contact a qualified WordPress developer.

Similar Articles

  1. How to Edit Billing Details WooCommerce Checkout Page