WooCommerce Coupon Shortcodes


This extension for WooCommerce allows you to render coupon information and show content based on the validity of coupons.

Customers can be motivated to proceed with their purchase, offering them to use specific coupons when the contents in the cart qualify for it, or by offering them to purchase additional items so they can use a coupon.

Extended coupon discount info for volume discounts is shown automatically, if Volume Discount Coupons is installed.

It also works with WooCommerce Group Coupons and WooCommerce Coupons Countdown.

Conditional Shortcodes

It provides the following conditional shortcodes that allow to enclose content which is shown if certain coupons are applied, valid or active:


These conditional shortcodes allow to render content if any coupons are applied, valid or active:


Coupon Info Shortcodes

It also provides shortcodes that allow to render the coupon code, its description and an automatic description of the discount:

[coupon_code] (this one makes sense mostly when used inside one of the conditional shortcodes).

A coupon iterator shortcode makes it easy to work with a set of coupons, the enclosed content is rendered for each coupon in sequence. The informational shortcodes can be used inside the content of this shortcode to display details about each coupon code.


For example: [coupon_iterate code="test,welcome,20off"][coupon_code] – [coupon_discount][/coupon_iterate]

A coupon enumerator shortcode allows to list all or a set of coupons, to show their code, description or discount information, or combinations of those using the [coupon_show] shortcode:



Please refer to the plugin’s documentation pages for detailed descriptions.


Show a text when a coupon can be used (active) – this is useful to show promotional info while coupons can be used, as active means that the coupon has not reached its expiration date nor exceeded its usage limits:

[coupon_is_active code="eastereggs"]
Happy Easter!
Use the coupon code [coupon_code] to hop away with a great discount : [coupon_discount]

This is an example of a text shown when a promotion is over:

[coupon_is_not_active code="specialdiscount"]
Our special discount sale has ended. Come back often to see more!

Showing a coupon when the cart contents qualify for a coupon to be applied:

[coupon_is_valid code="superdiscount"]
You qualify for a discount!
Use the coupon code [coupon_code] to take advantage of this great discount : [coupon_discount]

Showing a coupon that is not valid for the current cart and motivating to add items:

[coupon_is_not_valid code="25off"]
If you purchase 5 Widgets, you can use the coupon [coupon_code] to get 25% off your purchase!

Iterate over several coupons and show their discount info:

[coupon_iterate code="test,welcome,20off"]
Use the Coupon Code: [coupon_code] for [coupon_discount]

Iterate over all coupons and show their discount info:

[coupon_iterate code="*"]
Use the Coupon Code: [coupon_code] for [coupon_discount]

Show information about three random coupons, including the coupon code, its description and discount info together on each entry:

[coupon_enumerate code="*" orderby="rand" number="3"]
[coupon_show show="code,description,discount"]

Show a single random coupon code:

[coupon_enumerate code="*" orderby="rand" number="1"]

Documentation and Support

Full usage instructions and help is provided on these pages:


  1. Upload or extract the woocommerce-coupon-shortcodes folder to your site’s /wp-content/plugins/ directory. You can also use the Add new option found in the Plugins menu in WordPress.
  2. Enable the plugin from the Plugins menu in WordPress.


Where is the documentation?


I have a question, where do I ask?

You can leave a comment at the WooCommerce Coupon Shortcodes plugin page.


4 di Jugn dal 2022 1 reply
WooCommerce Coupon Shortcodes is not only incredibly handy but a masterful use of WordPress shortcodes!
4 di Avrîl dal 2021
Useful and easy to use. I’ve not had any issues with this plugin, it was as it says it would.
16 di Setembar dal 2020
Works great, coupon links are awesome and works perfectly adding items to the cart, and applying the coupon automatically. The redirection feature is also great to take the customer to the promotion category, while adding the coupon for the promo automatically.
21 di Avrîl dal 2020
Read all 16 reviews

Contributors & Developers

“WooCommerce Coupon Shortcodes” is open source software. The following people have contributed to this plugin.