How to Remove WooCommerce Coupon Code Fields

WooCommerce has the ability to let you set up coupon codes to offer to your customers that give them discounts on their purchases. You can actually disable these site-wide by going into the “Settings” options of your WooCommerce installation and browsing to the “General” tab to find the coupon options.

Disable Coupons in WooCommerce
Disable Coupons in WooCommerce by unchecking the box under “General” in Settings

All you have to do is uncheck the “Enabled the use of coupons” box and your entire site will remove the coupon code fields. It’s just that easy.

But what if you want to let customers use coupons but you want greater control over where they can be applied. By default, WooCommerce will give your users the option to apply coupon codes when they are viewing their carts and when they are completing the checkout process.

Coupon Code Fields in WooCommerce
An example of Coupon Code Fields in WooCommerce

You can remove the coupon code field with some small pieces of code. We’ll walk you through a safe way to do that on your own in this article. There is an alternative you can take that’s easier and faster that we will cover at the end.

How to Hide WooCommerce Coupon Code Fields with Code

You can remove the coupon code fields from any store yourself with a few lines of code. We’ll walk you through what is required to do this now. You’ll need to be familiar with some low-level web development concepts.

Warning! Please make a full and complete backup of your WordPress installation before attempting this. We’re going to be adding code to your site that might negatively impact its performance if done incorrectly. A proper backup will let you restore your site back to its previous working state in case of emergency.

Create a Child Theme

The best way to modify any pre-existing WordPress theme is to create a child theme. You can learn about how to make a child theme on the official WordPress site. In short, a child theme pre-loads another theme’s content and then puts its own content on top. This means any code you add to a child theme is not lost the next time the top level, or parent theme is updated.

Insert Code into the Child Theme

When your child theme is create and ready to go it is time to add some code to it. You’ll need to add this code to a file called functions.php in your child theme directory. Create that file if it doesn’t exist already. When it’s made you need to open it up in a text editor and add the following code.

Here’s the snippet to remove WooCommerce coupon code fields from your cart template:

add_filter('woocommerce_coupons_enabled', 'my_remove_coupon_code_field_cart', 10);
function my_remove_coupon_code_field_cart($enabled) {
    if (is_cart()) {
        $enabled = false;

    return $enabled;

The code to remove this field from the checkout is slightly different:

add_action('init', 'my_remove_coupon_code_field_checkout');
function my_remove_coupon_code_field_checkout() {
    remove_action('woocommerce_before_checkout_form', 'woocommerce_checkout_coupon_form', 10);

Save the functions.php when you have added the above code you need. Now it is time to move on to the next step.

Upload the Child Theme

When your child theme has the code you need it is time to get it on your server. You can upload a child theme in two ways. The easiest is to open up your WordPress admin and find the Themes section under the Appearance menu option. Package your child theme into a compressed .zip file and upload it to the server via the admin.

The other choice is to use something called FTP. There are dozens of FTP applications you can download and install on your computer. Your hosting provider should have documentation available on the steps you need to connect to the server. From there, you can upload the child theme directory and be ready to go. Most quality web hosts provide tutorials on how to do this all correctly.

Getting confused? If this whole process is overwhelming or too technical for you there is another option. You can remove WooCommerce coupon code fields without making a child theme, writing code, or uploading files. Learn how our Remove WooCommerce Features plugin can very quickly handle this for you.

Activate the Child Theme

We’re at the last step. Once you have uploaded the child theme head back to the Themes portion of the WordPress admin. If all has gone well you should see your child theme among the list of installed themes. You’ll have to re-upload the theme if it doesn’t appear as something went wrong for you during that process.

When you activate the child theme you should see the results of your effort immediately. The coupon code fields should be removed entirely from your store. If they are still showing or the site is broken in some way deactivate the child theme and re-check the code and child theme.

Eventually, through trial and error if you experience problems, you should have successfully removed the fields. Of course, this was a long and winding road to accomplish something so basic. There is a much easier way to take care of this.

How to Disable WooCommerce Coupon Code Fields the Easy Way

Our plugin, Remove WooCommerce Features, will let you remove the coupon code fields from your cart and checkout pages with just a few clicks of your mouse. After you have purchased the plugin and installed the plugin the process is simple.

Step #1

Go to the WooCommerce section of your WordPress installation’s admin menu and click the link that says Remove Features.

WooCommerce Admin Menu

Step #2

Find the setting for Coupon Code Fields and click the checkbox so that it’s marked like so:

Remove WooCommerce Features - Coupon Code Fields

Step #3

Press the button.

Job complete. Your site will immediately stop showing your customers the coupon code field on whichever page you chose to remove it from.

This setting will remain no matter how many times you update or change your WooCommerce theme as well. You’ll never have to worry about editing files or paying freelancers by the hour to do that kind of work for you again.

There are dozens of default features in themes that Remove WooCommerce Features supports disabling.

Remove WooCommerce Features Logo