How to Disable Coupons in WooCommerce

If you have a good marketing strategy, using coupons is one of the best ways to increase sales and keep your customers. However, this method can also have a negative impact on your business if you misuse it.

If you are find that using vouchers on your store page is not working as expected, we’ll show you how to disable vouchers in your WooCommerce store.

How to disable WooCommerce coupon fields

You have several options for controlling where and when coupon fields appear in your store. Let’s walk through each method so you can pick the one that works best for your situation.

Method 1 – Disable coupons from the entire WooCommerce store

If you’re tired of using coupons and no longer want to give your customers a discount, simply remove them from your entire store page. The process is simple.

Step 1 – Go to WooCommerce > Settings > General.

Step 2 – Scroll down and look for Enable coupons and uncheck the box near “Enable the use of coupon codes”.

Step 3 – Click on the Save changes button

Now, all coupon fields will be removed from your WooCommerce store.

However, we do not recommend this method. Using coupons has its advantages. If you don’t offer coupons, your customers might think they’re not getting the best deal. This could lead them to look elsewhere.

A better solution is to use vouchers in a flexible way. You can remove your coupons from one part of your store, such as the checkout page or the shopping cart page. Read on to find out how to do this.

Method 2 – Remove WooCommerce vouchers from the checkout page

There comes a time when you want to remove the coupon field on your checkout page, only to keep it on the cart page. Simply add this code snippet to your functions.php and you can remove the coupon field from your checkout page only.

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

The result is that the coupon field is not displayed on the checkout page, and users can only see available coupon codes on the cart page.

Method 3 – Remove WooCommerce coupons from the cart page

Another case where you only want to display the coupon code is on the checkout page. It means only when users come to make the payment they can see the discount codes offered.

To do this, simply add this code snippet to your functions.php file.

<?php
// Hide coupon field on the cart page
function disable_coupon_field_on_cart( $enabled ) {
    if ( is_cart() ) {
        $enabled = false;
    }
    return $enabled;
}
add_filter( 'woocommerce_coupons_enabled', 'disable_coupon_field_on_cart' );

Method 4 – Hide WooCommerce coupons for automatic application

A common use case is that you only want to provide discount codes to users who come via a special link. The best method is to apply the coupon code automatically and then hide it from users.

Simply replace the field for the voucher code with a message informing the user that the voucher has already been applied. This way, they will receive a discount but will not be able to share the code.

Simply copy the following code and paste it into the functions.php file of your child theme. If you don’t have a child theme, you can read how to create one or use one of these plugins in this article.

add_filter('woocommerce_cart_totals_coupon_label', 'quadlayers_hide_coupon_code', 99, 2 );
function quadlayers_hide_coupon_code($label, $coupon) {
    return 'Your coupon has been applied automatically!';
}

Conclusion

When you have full control over when and where coupon fields are displayed, you have the flexibility to make the most of discount codes. The truth is that most store owners find the selective approach works better than disabling coupons entirely. You can still offer discounts when it makes sense for your business, but you’re not training customers to always expect them.