Setting up WooCommerce Part 8 – Coupons, product & shopping cart discounts

woocommerce 8

WooCommerce offers a variety of coupon versions. Implemented sensibly, these coupons can be used for creating additional buying incentive. Here we will show you how to configure discounts.

You will find the central coupon administration section in WordPress under WooCommerce → Coupons. Any pre-existing coupons for your shop can be managed or even deleted here (with a simple click on the coupon name or the relevant coupon icon).

A new discount code is created by clicking the button “Add Coupon”.

WooCommerce Coupon Administration
WooCommerce Coupon Administration

Important: Coupons can only be applied if the option “Enable the use of coupons” is selected under WooCommerce → Settings → Checkout. See also these instructions.

General Coupon Data

Simple coupons are created quickly with a few mouse clicks, starting with the name of the coupon (“Coupon code”) and then selecting the options in the tab “General”:

add new coupons
This is where the basic attributes of the coupons are configured
  • Enter the name of the coupon in the field Coupon code. This is also the code your customer has to enter during the order process to redeem the coupon. You can use all lower case letters if you want. WooCommerce will convert to upper case letters automatically, once you publish the coupon. Here is a filter to allow you the use of upper case letters. This solution may, however, not be future-proof. Should your customer enter a non-existent code during the order process, then the message “Coupon does not exist!” will be displayed.
  • You can optionally enter text for the Description. It only serves an internal purpose, e.g. to show the functionality of the individual discount codes in the coupon overview.
  • The Discount type specifies, whether a discount should be applied to the cart or specific products as a fixed sum (entries “Cart Discount” and “Product Discount”), or as a percentage value (“Cart & Discount” and “Product % Discount”). You can specify separately, to which products a discount should be applied. More about that later.
  • The Coupon amount decides the total or the percentage value to be discounted. Here’s an example: The entry “5.50” would – depending on the type of discount – mean a discount of EUR 5.50 or a discount of 5.5% on the cart total or individual products.
  • Allow free shipping means: The coupon code will provide free shipping if this option is selected. Should you also configure a product or cart discount, then the free shipping will be added, which means that both options can be combined. In some cases, the customer will have to actively select the “Free Shipping” option to ensure that free shipping is applied. That depends on your WooCommerce shipping options. A free shipping discount will require some additional settings. Have a look at this tutorial on the two points above.
  • The Coupon expiry date allows you to specify until when the coupon code can be used. You will have to make sure to clearly communicate such deadlines to your customers. The customer will see the message “This coupon has expired.” if the coupon code input date is after that set expiry date. You can leave this field empty if you want to allow an unlimited validity for your coupon, or a validity until you terminate it.

The coupon you have now created, can still be restricted for use with specific products, categories, and other characteristics (more about that in the following sections). The box in the sidebar on the right, which you have already encountered for posting and product creation, is used for publishing the coupon.

Restricting the Use of the Coupon

You will find some simple, but very effective methods to give out discounts only in specific situations under the tab “Usage Restriction”:

Advanced WooCommerce coupon options
Advanced WooCommerce coupon options
  • Enter a specific total under Minimum spend or Maximum spend if you want to tie the use of the coupon to a minimum or maximum order value.
  • The option Individual use only means that the coupon cannot be combined with other coupons.

    Important: WooCommerce does not display a warning message for the customer, should he attempt to apply multiple coupons for one order. The system will simply delete all additional coupons previously entered for the same order process. Make sure to communicate that fact in your voucher information.

  • Product discounts will be applied only for items that were not previously discounted if the option Exclude sale items is activated. The system will in this case apply a cart discount only if there are no sale items in the cart. This is another important point you should inform your customers about.
  • You can select individual items from your range under Products. Simply enter the first few letters of the product name in the field. A dropdown list with products matching that name will appear, where you can now make your selection. The entered products must be in the cart for the discount to be applied (for the cart discount). Alternatively, you specify the products to which a discount should be applied (for the product discount). The following applies for these and the options below: Should the criteria not match the voucher code entered by the customer, then the following message will be displayed: “Sorry, this coupon is not applicable to your cart contents”.
  • The option Exclude products specifies products which must not be in the cart to use the coupon (for cart discounts). Alternatively, it will exclude products for which the coupon will not be applicable (a very handy feature).
  • You can select individual categories under Product Categories. For the discount type “Cart Discount” that means: At least one of the items in the cart must be from one of the selected categories. Should that not be the case, then the customer will see the following message: “Sorry, this coupon is not applicable to your cart contents”. For the discount type “Product Discount” that means: A product must belong to one of the specified categories for the coupon to be valid.
  • The option Exclude categories controls the following: Products of these categories must not be included in the cart for the cart discount to be applied. And as for the product discount: No discount will be granted for items from the stated categories.
  • The option Email restrictions allows you to create coupons for specific customers only. This can be useful if you want to offer a customer an individual discount as compensation for a complaint or similar. Here you enter the email addresses (separated by a comma) of the customers allowed to use the coupon.

    Important: WooCommerce will then compare the email address provided here with the one stored with the customer account. Make sure to inform you customer that he will only be able to redeem the coupon using that particular email address. Otherwise he will see the message “Sorry, it seems the coupon xyz is not yours – it has now been removed from your order”.

You can create virtually endless discount scenarios using a combination of all these limitation options. The inclusion and exclusion of products and categories is a particularly powerful tool. You could even create dummy categories to create discounts that differ from the structures visible in the shop.

Tip: You should always test your coupons before publishing them, using sample orders and unusual product combinations. It could happen quite easily that individual entries cancel each other out, or that some unwanted side effects are created. This could be unnecessarily aggravating for your customer, and you might not even hear about it!

Other Options

The tab “Usage Limits” offers some more options for you to use:

Coupon Limitation in WooCommerce
Coupon Limitation in WooCommerce
  • Usage limit per coupon: Here you can enter the amount of times the coupon can be used in total (by all customers) before it becomes invalid.
  • Usage limit per user: Specifies, how many times a user may apply a coupon. The coupon usage would be unlimited if you leave this field empty. If you want the coupon to be valid only one time per customer, then you have to enter a “1” here. The email address is used as comparison criterion to check if a guest order comes from an existing customer, who has already redeemed that coupon. In other words: if the customer uses a different email address for his second order, he could reuse the coupon despite the limitation to one-time use.

Experience has shown that only very few WooCommerce shop operators utilize all the discount options that are provided with the standard installation. These do, however, cover the majority of all possible use cases. Some simple trials and test runs will have you get the perfect coupon settings you need.

Post Sharing

Author Avatar

Editor at MarketPress. Passionate blogger, corporate blog expert and book author (e.g. "Blog Boosting"). Co-organizer of WP Camp Berlin.

Similar Posts


New Plugin: Slack Connector - Connect WordPress, WooCommerce and Slack

by Michael Firnkes

Initially we merely wanted to optimize our own Slack-processes. With automated notifications from our MarkettPress shop, the blog and our forums. The resul ...

Read more

Role Based Prices for WooCommerce is available again: Different prices for different customer groups

by Michael Firnkes

You want different prices for different customers and users of your online shop? E.g. for subscribers or wholesaler? Or do you need bulk prices? A lot of o ...

Read more

WooCommerce Weekly Review #7: Woo vs Magento, shop security and customer confidence

by Michael Firnkes

What is a WooCommerce shop in practice? And how do you protect it against external attacks? This and more in our Weekly Review. WooCommerce vs Magento: ...

Read more

WooCommerce Weekly Review #6: Translations, WordCamp Switzerland & avoiding legal warnings

by Michael Firnkes

WooCommerce was a hot topic at WordCamp in Switzerland. Progress is being made with the system translations and there are lots of useful new extensions. Th ...

Read more



  1. #1

    When I try to select a Product / Exclude Product, it display my pages and not my products??
    For Category products, it works…

    Any idea?

  2. #2

    Great article, well explicated.

    I have one more question that I’d love if you could answer: I’m thinking of offering the email discount you discuss to compensate targeted customers. Is there a way to keep it from being visible to other customers who will otherwise contact me trying to get the same? That is, when there’s a field for entering a coupon code much time consuming traffic gets generated with requests for the code, and resentment or even loss of patronage if it isn’t given. I’m redoing my hideous website in WP. Thanks, Elizabeth

    • #3

      @Elizabeth WooCommerce allows you to restrict coupons to specific e-mail addresses if that fits your use case? In your admin menu go to WooCommerce → Coupons → Usage Restriction → Email restrictions. You can enter a comma-separated list of e-mail addresses that specific coupon should be valid for.

  3. #4

    Is it possible to have a product discount of 100%, while allowing to add all the normal details during checkout. The scenario is :

    we use WOOCommerce + InfusedWoo and InfusionSoft is used as payment processor for the products including subscription products. In WooCommerce we set it up as a normal product (including subscription products also. In a special promotion we want to allow a product discount of 100% for products, which includes subscription products.

    So in order to do that we need to capture the data during checkout also, but we are getting the error message “Checkout Skipped : There is no balance to Charge”, error message to user, even though their data including CC details are all getting captured in InfusionSoft. Is there a way to show a more customized message to user in frontend, or simply redirect them to thank you page?

    Any suggestion?

  4. #5

    Great article!! 🙂

    I’m looking for a way to show the coupon discount on the product line and not at the bottom in the subtotal. Is there a plugin for this or code?


  5. #6


    I have facing some issue with “Discount Type” which is set to “Recurring Product Discount”.

    I have problem is suppose I have a variation product with Price of $159 and Discount Coupon amount is set as $74. Now when product is renew then this is working correctly but whenever any payment failed then when customer go to pay again for that order, then the Discount amount ($74) will not applying with order total amount. He has to pay full amount ($159).

    Is there any solution for that?

  6. #7

    You can also try this plugin “WooCommerce Promotion Helper”
    It allows you to generate an unique coupon for each user based on pre-set pattern.

  7. #8


    my website has a coupon discount, the coupon calculates the subtotal of the site without the shipping charges.
    what i need is the coupon to calculate the total amount of the cart (the subtotal + the shipping), i cant find anything about this
    pleas if you can help me calculate the discount width the total not the subtotal i will appreciate it very much

    subtotal: 100$
    shipping: 45$
    coupon: 145$
    total: 45$
    i want after discount: 0$

    thanks in advance

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">