In our article on improving eCommerce conversions, the #7 tip was to rename or hide coupon code fields on your checkout pages so your customers aren’t automatically searching for coupons as soon as they see the checkout page.

Simplifying and streamlining the checkout process improves conversions, so encouraging customers to leave your site to go coupon hunting can hurt your bottom line. Renaming the coupon field to something like “Promotional Code”, or hiding it until the checkout / payment screen can help reduce this behavior.

WooCommerce makes this fairly easy to do with some short code snippets that can go directly into your theme’s functions.php file without needing to change any theme templates. By default, the coupon code field appears like this:


Cart

Cart



Checkout

Checkout


Hiding the Coupon Form #

If you’re not using coupons at all, you can hide the form on the cart and checkout page by unchecking “Enable the use of coupons” from WooCommerce > Settings > General, but most times you’ll want to leave coupons enabled in case you need to give a customer a discount for some reason. In this case, you can use this snippet to simply disable the form on the cart/checkout pages, but leave coupon use enabled otherwise. This is particularly helpful in combination coupon-related plugins like Smart Coupons and URL Coupons that apply discounts without directly requiring customers to enter a code.

However, if you still give out discount codes, you’ll want a place for customers to enter them. If this is the case, I’d recommend testing whether hiding the discount code from the cart page or from the checkout page makes a greater difference in conversions for you. Test hiding from one page first for an extended period of time, then another (try to keep everything else consistent in your store).

If you want to hide the coupon form on the cart page or the checkout page, you can use these snippets to do that:

Renaming the Coupon Form #

Simply renaming the coupon field to something else can also reduce the number of customers that leave your site during checkout to find coupon codes. Customers that already have the code will know what name to look for as long as you’re consistent. For example, if you email out “Offer Codes” or “Promo Codes”, then customers will look for this field, yet those without coupons won’t get distracted by the words ‘coupon’ or ‘discount’.

Our favorite is something like “Promo Code”, but you can use whatever fits your store best. To change the coupon code on the cart page, use this snippet:

Simply change the text inside the single quotes to whatever you’d like the “Apply Coupon” button to say :) . When you’re done, it should look like this:

Apply Promo Code

Apply Promo Code

Now the checkout page is a bit more complicated, as there’s a message displayed and the customer has to click to enter their code, but it’s still worth changing the wording to match what you’re using on cart page or while communicating with customers:

You can adjust these by changing the text inside single quotes, just like the cart page snippet. You should see something like this when you’re done:

Have a Promo Code?

Have a Promo Code?

Want to know more about why this practice is so useful? Check out this article from KISSmetrics on hiding or renaming coupon fields to improve conversions.

Now go rename or hide those coupon code fields! Hopefully these snippets help you customize your WooCommerce cart / checkout pages and limit cart abandonment for your store.


Cover Photo Credit: StockMonkeys (CC BY 2.0 license)
Articles you may also like:

Posted by Max Rice

Max Rice is a frequent Sell with WP contributor and cofounder of SkyVerge. He develops eCommerce plugins for WordPress, and specializes in WooCommerce development. He likes writing articles about random WordPress and eCommerce topics.

63 Comments

  1. I had been using URL Coupons as the only way to provide coupons and now I’ve used your snippet to hide the coupon fields. No more buyers abandoning the checkout process to go search for coupon codes. That’s just what I needed. Thanks!

    Hiding those fields might be a sensible option to include in the Smart Coupons and URL Coupons extensions.

    1. Hey Doug, glad this was helpful :) We actually said the same thing after Max wrote this tutorial, so it’s an option we’re looking to add to URL Coupons in the near future. Keep an eye out!

    2. I know that this has been a while, but the URL coupons release for this week includes this option under the “Checkout” settings. Hopefully that helps to simplify this even further!

  2. Hi, thank you for this :-) It has solved several problems for me. Do you have any tips on changing the text “Please enter a coupon code” that appears if you click the coupon button without any code? It would be great to be able to refer the customers to the right place where they can receive their coupon code (in this case by becoming a member)

    Hope you can help. Thanks /Michael

    1. Glad it helped! You can completely change that section by overriding the form-coupon.php template under /templates/checkout — we have a quick tutorial on how to override templates on my company blog :)

  3. Hi friend, great article, I can’t find your snippet for changing the coupon code text, Can you repost it?

    1. So sorry about that! The plugin we use for gist embeds was updated and broke the old shortcodes. Should be fixed now :)

  4. adding your code to rename “apply coupon” did not work for me, is the a way I can manually do it in the core files (and yes I know this change will be lost when I upgrade) You help would be appreciated.

    1. You can override the cart.php template and change the wording manually if you’d like, it’s on line 118: https://github.com/woothemes/woocommerce/blob/master/templates/cart/cart.php#L118

      If you override the template by copying it into your theme (e.g. your-theme/woocommerce/cart/cart.php) then you won’t lose your changes when upgrading WooCommerce :)

  5. Can you please tell me how to adjust the field of the place where coupon should be entered? There writes “Coupon code”(I guess it’s code I can not see it). I guess my options are to:
    -remove “Coupon code” and leave it blank, Apply code explains it itself;
    -make “Coupon code” field longer.
    Can you please tell me what to do to make these changes.

    1. Check out the gists under Renaming – they’ve been fixed. That will help you change the “Coupon Code” text. As for making the field longer, this will require some CSS tweaks to your theme – are you talking about the cart page?

      1. Yes, I am talking about the cart page.
        Thanks for the link, I will take a look now.

  6. The Renaming snippet works great for renaming the button on the cart page but how do you change the text “Coupon Code” inside the text field? Thank you!

  7. Hi, thank you for the code, but in my case it warks too good, i also use woocommerce points and rewards plugin and when i use ur code the redeem points section desapears as well in check out page. Could you pleas give me a code witch hides coupon section and leaves points and rewards section visible. Thank you, Martina

  8. Or is it possible to hide the coupone field only on cart page?

    1. Hey Martina, you can hide coupons on the cart page by only using the first part of the snippet above: https://gist.github.com/maxrice/8550827 (lines 3-12)

  9. Hi! I’ve been using the functions to rename ‘Coupon’ to ‘Promo Code’, but something broke after I updated to Woo 2.2. Have you heard that anywhere else? Perhaps a deprecated function?
    Thanks in advance.

    1. Yep, something changed – the gist for renaming fields on the checkout page has been updated so that you can actually enter a code :) .

  10. Hey wow – thanks! That was fast and worked perfectly.

  11. Those snippets rock, thanks for sharing them!

    In WooCommerce checkout, do you have any idea how to move the “Apply Coupons” field further down the page closer to the payment section? I feel like potential customers will convert more if they deal with all money stuff later on the page after entering address and email…

    1. Hey Scott, try something like this: https://gist.github.com/bekarice/62cfca8c65debfb37362

      You could change when the form is re-added by using a different checkout template action.

  12. Thanks for the article. I tried to paste the snippet for removing the promo box from the cart page, but no luck. Which file should the snippet be entered? I tried both function.php and the woocommerce cart.php.

    1. Hey Matt, try the code snippets plugin as explained here.

  13. It looks like the snippets aren’t showing? I was on this page yesterday and could see them.

    1. Hey Jason, thanks for the heads up! Should be fixed now :)

  14. Hello!
    I have a problem with renaming two coupon-related things on cart page + checkout page:
    when a coupon is applied, its value appears within an order summary .. the line says “COUPON: … [Remove]” >> how can I edit these two words?? Can anyone help?
    THANK YOU! <3

  15. Your method actually works !! How should I take care of the message “Have A Promotional Code?”. Thank you anyway !!

  16. Echoing what jesika said. On the checkout page under the order review it lists:

    Coupon: Discount Total and [Remove]

    I for the life of me can’t figure out how to change that label from Coupon. I’ve used your provided snippets to get everything consistent to much rejoice! I cannot figure out why woocommerce makes it so difficult to change the wording of ‘Coupon’ in their shop set up…it’s something everyone wants.

    1. There’s a filter around it that makes it very simple to change — this is a good tutorial, or something like this could change the wording but keep the code:

      function sww_wc_cart_coupon_label( $label, $coupon ) {
          return 'Promo code: ' . $coupon->code;
      }
      add_filter( 'woocommerce_cart_totals_coupon_label', 'sww_wc_cart_coupon_label', 10, 2 );
      

  17. Thank you so much Beka! I am going to proceed through the tutorial as well.

  18. That code repeatedly broke my site. I had to reload the functions.php via ftp to get access back???

    1. Hey Scott, try removing the <?php in the front; your functions.php probably doesn’t contain a ?> at the end, so you don’t need to use the opening tag.

      1. Thank you for that. That stopped it crashing cheers.

        The weird thing now is I used the code you posted here https://gist.github.com/bekarice/34f107986cdc15f1dbd7 as i wanted to remove the placeholder text too.

        When i added that code to functions php it changed the placeholder and button text for the coupons on the checkout page but left the text the same for the cart page?

        Isn’t that somehow around the wrong way?

        Thanks

        1. Hey Scott, you either have some other code interfering on the cart page, or perhaps the template is overridden and text is hard-coded into your child theme. This works for me to change the field on both the cart page and in the coupon notice at checkout, so I’d remove other custom code related to the cart page.

  19. Hey there,

    I added the code to change the wording on my checkout page, but now ‘click here to enter your code’ appears twice! How do I get rid of the second one?

    Also, how would i change the word ‘coupon’ to ‘promo code’ when the success message comes up, and also in the order details?

    Thanks so much for this code, you guys are awesome :)

    1. Hey Charmaine, the first issue isn’t one I’ve ever heard of happening, so I might remove that code and try a different approach. For both issues, you may want to just translate the text to replace it with your own, for which the Say What plugin can help — more details in this tutorial.

      1. Thanks so much for the reply, I really appreciate it! I’ll give that plugin a go. yes it was strange it appeared twice, seeing as I haven’t changed anything else in my functions.php file or any of my woocommerce templates for that matter! I thought it might be something conflicting but wasn’t sure :)

        Thanks again!

  20. How do I completely take away the coupon box in the “cart” page?

  21. Is it possible to hide the coupon form based on User Role? I have a user role called “wholesale_customer”. I don’t want the wholesale customers to use coupons, so I want to hide the coupon form only for those users.

    1. Possible, requires additional code to check this though. There are samples on checking for roles in this article, and you could get the customer’s ID using: get_current_user_id()

  22. I’ve used some of these great tips, but I’d like to refine it more.

    I offer coupon codes only for certain items. I’d like to hide the coupon entry unless there is an item in the cart with a coupon available. Any idea how that could be done?

    If cart contains eligible item, show coupon field, otherwise hide it.

  23. sensational post!!!! thx

  24. Hi,
    Im trying to remove all traces of the word ‘coupon’ on my cart page (as we just don’t really use that term in Australia). I’ve had a bit of success but still have a couple that I can’t fix. One is the box where the code is to be entered, and the other is when the code is applied the success message that appears also says coupon. Is there any way I can remove the word? Thanks for any help!

    1. yep, certainly not easy to do. The box where the coupon is entered should be covered by the code here (may be a theme issue if not).

      As for the messages: you could translate all of the coupon messages, as there are several, to replace the word coupon. The class-wc-coupon file has the messages, and we have a a tutorial on translating shop messages. It’s a bit involved so I might ask a developer for help if you’ve not done something like this.

      1. Hi Beka,

        Thank you so much for getting back to me. I am an absolute novice at this – an interior designer trying my best! I think I can live with the messages retaining the word coupon as I can’t even begin to figure that out, nor know where to even find a developer.

        Is there a link for the code for the box where the coupon is to be entered – that would be the best win for me but I can’t see a link? I think I need to put in ‘Enter Code’ just so it is completely obvious to be people what they need to do.

        Thanks again,
        Carolyn.

        1. Sure thing, translating stuff like this can be complicated when you’re starting out :) I typically recommend Codeable for small code jobs if you’re ever in the need.

          As for the translation of the coupon code box’s button, that’s under “Renaming” above.

  25. Hi – Thanks for the recommendation. I have put in the bit of code above under Renaming (I am just copying & pasting into my themes functions php) but it only changed the button to Apply Code – it didn’t change the box to the left of it where you enter the code. Is there something that will change that box too?

    Thank you again – I think I’ve done pretty well so far but this final tweak is completely defeating me!

    Carolyn.

    1. hmm looks like WooCommerce added a placeholder to that field that wasn’t there before. This code snippet could replace the first one under “Renaming” to add another check / translation for that placeholder. That should translate it so long as your theme isn’t doing anything crazy :)

  26. Oh that’s fantastic!! Thank you so much. There was just one hitch – the size of the box is too small to read the text inside it – I think it always was as I thought is just said coupon previously as couldn’t even see the whole line. Is there any way of making the box longer, like the same size as the box that says Apply Promo Code?

    Thank you again for helping me out.

    Carolyn.

    1. Sure, would need some CSS to do, but that would depend on your theme. If that’s something you’re looking to learn how to do, Codecademy is a great tool.

  27. Hi Beka,

    Doing CSS is pretty much beyond me – I can handle finding a fix and copying it in but that’s pretty much it. Google came to the rescue on this and I found the code below I put into my Theme Custom CSS section. i hope this helps someone else out!

    .woocommerce table.cart td.actions .input-text, .woocommerce-page #content table.cart td.actions .input-text, .woocommerce-page table.cart td.actions .input-text {
    width: auto; height: auto;
    }

    Carolyn.

  28. This is amazing, thank you! I really disliked how the Coupon Code field added so much space between the Cart contents and the Totals at the bottom — it basically made the Proceed to Checkout button invisible unless the shopper kept scrolling and scrolling! What a relief to know people can buy without that big hurdle.

    By any chance do you have an article explaining how to move the “I’ve read and accept the terms & conditions” checkbox on the Checkout page from BELOW the Place Order button to ABOVE the Place Order button? I think that’s so confusing for shoppers to figure out they need to take an action below the button! I used to just move the line of code in the review-order.php file under my theme, but that stopped working for some reason.

    Thanks so much!
    Chloe

  29. Hello,

    In Woocommerce I was able to change the “coupon” name within the file “form-coupon.php”.

    File is located here : wp-content/plugins/woocommerce/templates/checkout

    You should change the “info_message” on line 17.

    @author WooThemes
    @package WooCommerce/Templates
    @version 1.6.4

    1. I would not recommend doing this. (1) Your change will be overridden when you update WooCommerce since you’re modifying the core plugin. This is not something you ever want to do. (2) If you’re overriding the template in your theme, you need to check it during every major version to be sure it’s still compatible with the core WooCommerce template. Modifying things via hooks is a far better alternative if available since it’s upgrade-safe.

      1. Thanks Beka, you’re right. It may not be the best way to do it.
        But for me adding your code to “functions.php” has no effect :(

  30. Hi Max

    Thanks for this awesome tutorials. Two things:

    Have You tested to move the comment form to the top instead of after all the comments? I had to scroll down a lot because the number of comments in order to find it.
    Is there a way to move the coupon field to the product page in order to people know the final price after the coupon?

  31. Hi Max Rice,,,,,,,,,,,,,,,

    Thanks a lot… U have good heart.

    All the best. Thanks again Sivaldo from Chennai – India.

  32. So I’ve added the code above and all works fins however there’s still three places that the Coupon text appears!

    One is when you add the code the box above displays Coupon Code added. This is on the cart page. Also on the cart page within the totals it still says Coupon- then whatever the coupon is.

    This is the same for the checkout screen.

    There any way to change those final bits to Promo Code??

    Thanks for such a good post as well

    1. For the order review table, there’s a tiny snippet in this article that should help: https://www.skyverge.com/blog/hide-woocommerce-coupon-fields/

      As for the coupon messages, you could translate those messages with something like the Say What plugin, or you could use the filters in the coupon class if you’re familiar with them. Here’s an example.

  33. Hi I have managed to remove all the coupon words renaming them with ‘gift code’ but when someone adds successfully / or not a code it still says ‘Coupon code applied successfully.’ or ‘Coupon “xxxx” does not exist!’
    i can’t find it anywhere … where should i go to replace?
    thanks

It's been over 2 years since this post was published, so comments have been closed. Thanks for reading!