Do 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:
- Log into your WordPress site and access the Dashboard as the admin user.
- From the Dashboard menu, go to WooCommerce > Settings and click on the General
- 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:
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:
If you do not want to completely disable the coupons, here are the steps that you need to follow:
- Log into your WordPress site and access the Dashboard as the admin user.
- 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.
- To remove the coupon code from the cart page, add the following code to the functions.php file:
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]
- To remove the coupon code from the checkout page, add the following code to the functions.php file:
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]
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
- How to Edit Billing Details WooCommerce Checkout Page
- How to Change Quantity In Checkout WooCommerce
- How to Hide Admin Bar for WooCommerce Customers or By User Roles
- How to Add Submenu to Custom Post Type Menu in WordPress
- How to Use WooCommerce Product Attributes Step by Step [Complete Guide]
- How to Create Custom Order Received Page WooCommerce
- How to Add New Tab WooCommerce Product Page
- How to Add Custom WooCommerce Payment Icons Checkout Page
- How to Hide WooCommerce Product Count
- How to Hide Order Status In WooCommerce
- How to Hide Product Gallery In WooCommerce
- How to Hide Trailing Zeros WooCommerce
- How to Hide & Rename Addresses Tab My Account Page WooCommerce
- How to Hide Price If Zero In WooCommerce
- How to Change WooCommerce Thank You Page
- How to Remove or Rename Sale Badge WooCommerce Storefront
- How to Fix Billing Postcode is Not a Valid Postcode / ZIP
- How to Change Storefront Theme Product Page Tabs Colors
- How to Add Currency to WooCommerce [Custom Currency]
- How to Hide Dashboard on the My Account Page WooCommerce