Skip to content

How To Set Up and Extend WooCommerce Coupons


WooCommerce Coupons offers a great way to give your customers discounts on products and/or services. In this post, I show you how to create a coupon with the flexibility of expiration dates and usage-per-coupon.

In addition, I will share other posts that show you how to extend the basic coupon functionality in WooCommerce.

WooCommerce Coupons

Coupons are useful for way thanking existing customers, as well as enticing new customers. It also allows you to create custom codes that you can easily share online, in newsletters, or in personal emails to clients as a thank-you.

To add a coupon, go to WooCommerce > Coupons

Coupon Data General

You will be sharing the coupon code with your customers, so make it simple and not some complicated mix of numbers and characters.

You have three options for discounts: a flat percentage,  a fixed cart discount for the customer’s cart total, or a fixed product discount for a specific product.  Free shipping can be activated, as long as you have shipping enabled and of course, an expiration date for the coupon.

WooCommerce coupons general data

Coupon Data Usage Restriction

Here is a breakdown of all the options:

Minimum spend – You may choose to have a minimum amount that customers add to the cart before they can use the coupon

Maximum spend – This is good for large discounts. You may want to limit up to a certain amount.

Individual use – Restricts the customer to using just this one coupon. Especially useful on cart discounts.

Exclude sale items – Lets you exclude any products or services you have on sale. Make note on the coupon that it cannot be applied to sales items so they aren’t surprised or confused.

Products – Here you can choose any product you have created to apply the discount to.

Exclude products – Exclude any specific items from the discount. This is good if you have created a cart discount, but have some disclaimers on just a few items.

Product categories – Same as products except you can use a category. You may have created a category just for these instances.

Exclude product categories – You may have created a category just for these instances.

Allowed Emails – A list of emails to check against the customer’s billing email when an order is placed.

woo coupons updated screenshots

Coupon Data Usage Limits

The limits on usage can be set in two ways. You can set a restricted amount that the same coupon can be used over and over with all your customers. Or you can set a restricted number of times a single customer can use the coupon.

Applied Coupon

Once they enter the coupon in the field and click on apply, a message appears and the final total reflects the discount.

WooCommerce Blocks for Coupons

Although there are not specific blocks for coupons, I would suggest that you use the Hand-pick Products block that would allow you to choose specific products that have coupons available.

This would be great way to send a customer to a landing page with a special coupon for a group of products where they could use their personal coupons code.

hand-pick products block

Using a Block to Offer Coupon Deals on Posts and Pages

You might be writing a post about something to do with your online store and it’s products. Whether they are physical products or even your services. Here is a simple way to use one of the WooCommerce blocks to display those coupon-related products.

Use a Category

You could do this a couple of ways.

Create it with an existing category. When creating your coupon you would simply add that category.

On the other hand, if they are specific products you would need to:

  • Add them to the coupon as individual products
  • Create a category just for the usage and assign them to it

Adding it to your post or page

You simply create your post, for example I might be writing about the three microphones I have for sale. Then I would use the WooCommerce block for categories to add the products. Since there are three products, I have set my column for 3.

Adding the text in the post before this, I now have a post with the three products at the end with an option to purchase them using the coupon code.

Need More Options for Coupons?

WooCommerce has several extensions that can fill just about any need that goes beyond the choices WooCommerce allows. Here is a list of posts (and a link) that we have on our site that will allow to you extend the WooCommerce coupon feature.

How to Redirect a Customer to a Special Coupon Page

After making a purchase, you may want to redirect the customer to a landing page with a special thank you. This could be a coupon for a specific product, or just on the next purchase. Here is where I’ll show you how to do that easily.

How to Create Powerful Coupons for Your WooCommerce Online Store

WooCommerce advanced coupons gives you dynamic control of your coupons. It will let you easily set up a buy one, get one, and long-term coupons that will work using for your specific needs using conditional logic. There’s a lot more you can do with it and you can read our post here.

How to Specifically Create a Buy One, Get One Offer

Using coupons to give someone a deal on a discount when purchasing, or even a get one for the price of two, is a great way to increase your conversions. This post shows you how this plugin does that plus a lot more.

How to Give Store Credit to Customers on Your WooCommerce Site

Sometimes you end up using a coupon for a store credit you need to give, but the Store Credit extension makes it easier and is more specific to that need. Here is a post showing you more of what you can do with it.

Add a Custom Message with a Coupon Code at the Top of Your WooCommerce Pages

With the WooCommerce Conditional Content extension you can add a custom message to the top of any WooCommerce page or products. It’s easy to add a coupon code and link in the message using this plugin. We show you how it works here.

How to Extend Coupon Restrictions with WooCommerce

Learn how you can restrict coupons in WooCommerce for new customers, existing customers and based on their location in our post here on the .

How To Give a Free Gift Coupon in WooCommerce

You can reward your customers by using the Free Gift Coupons. It lets you easily create a code that will give your customers access to a free gift. It’s a perfect solution for your most loyal customers. Check out our post here.

Auto-Apply Coupons to the Cart Using a Custom URL in WooCommerce

Save your customers time by being able to create and sent them a URL that once clicked will automatically add it to their cart with a discount applied. It’s part of the WooCommerce Advanced Coupons plugin, but here is a post that shows you how this specifically works.

How to Reward Your Customers Who Leave a Review on Your WooCommerce Store

Reviews are so important to the success of your online store. And when people take the time to review your product, why not reward them with a discount by using this extension. You can use it as an incentive to push people to leave reviews.  But to send them a surprise credit after leaving a review?  Now that’s cool. Learn more about it here on our site.


  1. Larry Goldstein on November 4, 2017 at 9:25 am

    can I track sales of whom I assigned a coupon code to ?

  2. sanjay on November 22, 2017 at 1:55 am

    Can i set coupon for 4 numbers of a single product??
    Thank You

    • BobWP on November 22, 2017 at 7:31 am

      Do you mean can you set multiple coupons for a single product? If that is correct, yes you can.

      • Miguel on January 9, 2018 at 1:47 am

        Hi, i need to set two combined coupons for a little group of products. Haw can i do this?Is there a plugin?Thanks in advance.

        • BobWP on January 9, 2018 at 9:40 am

          Not sure if either of these would do that, as I am not exactly clear on how they need to work. But there is the Smart Coupons extension and also the Group Coupons.

  3. Alan Maher on November 28, 2017 at 4:33 am

    Hi, I currently have smart coupons installed with woocommerce. When I create a variable product for gift cards, and try to link the coupon i created to that product. I can not type anything or select anything in the coupons box when i try select what coupon I want to link to my product. Any idea why I cant link anything to my product?

    • BobWP on November 28, 2017 at 12:35 pm

      I believe you cannot set a coupon for a variation in WooCommerce. I don’t even think their extension Smart Coupons does that. Off-hand I don’t know of a plugin or extension that will do it, but if I come across something, I will come back and let you know

  4. Ken James on December 10, 2017 at 6:21 pm

    Hi Bob: When i am editing the coupons there is a section on the far right that indicates “public”, “private”, or “password protected”. Since there is a “Publish” button it makes me nervous that these coupons are being made public to the world. Is that correct? The reason i;m asking is I wanted to make a special coupon code just for me and my partner to use. I’m concerned about this whole section and what it means to the privacy of my site. Thank you.

    • BobWP on December 11, 2017 at 7:14 am

      Actually that should not be a concern as no one will actually land on that coupon page. That is just the default functionality of WordPress that is used for pages, posts, and post formats. Eg, want to make a page private, use that. By making it public is simply allowing people to use that coupon, but they won’t be able to land on it and snag it for their own purposes. If you were to make it private, I think that would mess things up on the usage of it if you did share it with anyone. With it being for just you and your partner, I’m not sure what implications would take place if you were to mark it private. I know you would have to be logged in. So in a nutshell, don’t worry about that.

      • Ken James on December 11, 2017 at 7:17 am

        Thank you so much. I was hoping that would be the response. I could find precious little on this subject doing a search. Always enjoy your work!

  5. Brian Griffin on January 8, 2018 at 12:35 pm

    Hi Bob. I am just trying to create a new coupon and in your screen grab above, where it says ‘products/search for a product’ I am not showing any products. I can select categories but the products box is blank. I have created coupons before with no issue, so I’m not sure why products are not showing now?

    • BobWP on January 9, 2018 at 9:24 am

      That is odd, if you have published products. All I can guess is that there is some plugin conflict, although that seems like a strange one. I would check to see if everything is updated, and also if you added or updated any plugin recently, that could very well be the culprit. Beyond that, just not sure as I haven’t seen that issue on any sites yet.

  6. Arun Sen on January 21, 2018 at 7:18 pm

    Great article, thanks!

    I was wondering if there is a way to set up coupons to only apply to product price (but not shipping)?

    e.g. 20% off all *product price only*? I can’t seem to find a way to do it.

    The default % coupon applies to the whole cart, and discounts the shipping too.

  7. Huỳnh Ngọc Duy on January 31, 2018 at 10:10 pm

    So Is it possible to setup the end time of coupons??? Thanks

    • BobWP on February 1, 2018 at 6:26 am

      Yes, that is what your expiry date is as shown in the screenshot above.

  8. underground on March 9, 2018 at 2:43 am

    Hello! I have a site with touristic offers. I have a question. If the customer pays now, he has a 15% discount. If he pays next week, for example, he has a 10% discount. And if he pays over two weeks (close to the departure date), he pays the full price. On the other hand, I also look for the possibility of paying 50% of the full amount (advance payment). How can be implemented through coupons? In woocommerce the variable price is only possible for a single period dates. But in my case, I want 3 different payment periods. So, these coupons can be applied based on period dates? How? Thank you!

    • BobWP on March 10, 2018 at 8:44 am

      Yeah, that’s a pretty complicated things to answer simply in a blog comment 🙂

      Requiring a partial payment isn’t part of a coupon function, so that is going to take something else. There are plugins out there that do conditional logic on the cart, I believe I have one on this site if you search. Cannot say for sure if that will do the trick, but my thoughts it this will take more than the coupon functionality offers. Now you might at least look at the smart coupon extension and see if it’s features would cover what you need.

  9. Han on March 30, 2018 at 9:03 pm

    If I want to make a separate place to receive coupons at the homepage, how do I do?

    • BobWP on March 31, 2018 at 7:41 am

      Okay, I’ll be honest with you here, so simple answer to that one. Depends on how your homepage is set up. What theme you are using. Where you want it on the homepage. What should it look like. Unfortunately too many variables to be answered in a commment. Thank widget areas on your homepage. Or if you are using a page builder, a spot for those. You will just need to get a bit creative and how you want to deliver this.

  10. Anonymous on June 6, 2018 at 8:12 am

    I have a same question in when should we use private or public coupon settings

    • BobWP on June 6, 2018 at 12:39 pm

      I’m not sure who asked this before, but I’m not clear exactly what you mean. There are not specific settings for a “private coupon”. You basically created a coupon and decide who you make it available. How much you limit the usage, exposure is up to you. Happy to explain more if you could give me an example of what you are wanting to do.

  11. Michele Clarke on June 19, 2018 at 6:59 am

    I need to be able to use the same coupon code whether the customer chooses one time purchase or autopay. Is this possible?

    • BobWP on June 19, 2018 at 7:05 am

      When you say autopay, is this a subscription model? If that’s the case, it depends on what you are using. For example, the Subscription extension for Woo works seamlessly with it and will integrate coupons into it. Something else? Well, you would need to see how that works.

      Often if it is integrated into Woo, subscriptions should show as an option in the coupon settings or somewhere.

  12. lsjoy on September 7, 2018 at 11:46 am

    I just created a couple of coupons in woocommerce for wordpress and set the usage limit to unlimited use of coupon by everyone, but only one use per customer. The list of coupons shows 0/infinity symbol so it did not enter my usage of one per customer? 0… does that mean no one can use it? Thanks!!

    • BobWP on September 7, 2018 at 12:44 pm

      Yeah, it’s confusing. And not sure why they show what they do there. But yes, if you see 0/infinity like you said, that means Usage limit per coupon is unlimited and it doesn’t show there the usage limit per user. So as long as you have a limit per user, it will work. I’ve even tested that before as it was confusing for me in the very beginning.

  13. grajkumar on November 4, 2018 at 2:24 am


    i created a coupon and i restricted that to be applied on some products and one sub-category, when i add all products including restricted products, coupon is not applying even when i set limit is above the given bill amount.

    Please help…

    • BobWP on November 5, 2018 at 8:49 am

      Unfortunately, I find that in most cases like this you need someone to preview your settings and also to see if there is some other conflict. Hard to answer via a blog comment. 🙂

  14. Nirmal Kumar on March 30, 2019 at 11:11 am

    Thanks for the tutorial. Coupons are a great way to drive sales to your business. I always had a thought of creating an eCommerce store with WordPress. But, still not able to decide whether to go with WooCommerce or Easy Digital Downloads because both are quality plugins.

    • BobWP on March 30, 2019 at 12:08 pm

      You are welcome.

      And that is a decision that I have known a lot of people have had to make. It’s always hard to have a simple answer not knowing all the variables. But I know when I have been asked that, what I start with is this.

      If you are going to only sell digital downloads now and in the future, EDD is a great route to go.

      But if there is any chance that your will do physical products or other products that just fit WooCommerce better, than Woo is the route to take.

      The key here is knowing what you will need in the future and what will work without you having to switch out again.

  15. Alvina on September 12, 2019 at 10:33 pm

    Hey BobWP, Thank you for this tutorial. I need help in adding coupon code to my store. I have seen this tutorial and implemented the same steps that mentioned in this tutorial but I am having an error when I add coupon it’s saying the coupon is not valid. Can you please tell me any alternative to do this? Here is my code

    add_action( ‘woocommerce_before_cart’, ‘sh_coupons_matched’ );
    function sh_coupons_matched() {
    global $woocommerce;
    $sh_coupon = ‘OnlineShop’;
    if ( $woocommerce->cart->has_discount( $sh_coupon ) ) return;
    foreach ( $woocommerce->cart->cart_contents as $key => $values ) {
    $autocoupon = array( 65 );
    if( in_array( $values[‘product_id’], $autocoupon ) ) {
    $woocommerce->cart->add_discount( $cw_coupon );

    • BobWP on September 13, 2019 at 10:29 am

      Sorry, but I am not a coder. So can’t help you much on that…

  16. Naila Ubaidulla on October 14, 2019 at 5:24 am

    Can I add a condition that coupon cannot be applied if a particular product/category is in cart?

Your thoughts...