WooCommerce Coupon Shortcodes

This extension for WooCommerce allows you to render coupon information and show content based on the validity of coupons. You can install WooCommerce Coupon Shortcodes directly from your WordPress Dashboard.

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 can be shown when used with the Volume Discount Coupons extension.

This tools also works great when used 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 coupons are applied, valid or not valid.

  • [coupon_is_applied] and [coupon_is_not_applied]
  • [coupon_is_valid] and [coupon_is_not_valid]
  • [coupon_is_active] and [coupon_is_not_active]
  • [coupon_has_active] and [coupon_has_not_active]
  • [coupon_has_valid] and [coupon_has_not_valid]
  • [coupon_has_applied] and [coupon_has_not_applied]

Coupon Information

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

  • [coupon_show]
  • [coupon_code]
  • [coupon_description]
  • [coupon_discount]

Working with Sets of Coupons

A coupon iterator makes it easy to work with a set of coupons.

  • [coupon_iterate]

A coupon enumerator produces a list of coupon information.

  • [coupon_enumerate]

Documentation

The Documentation provides detailed descriptions and examples.

85 Responses to WooCommerce Coupon Shortcodes

  1. Serban February 21, 2024 at 11:10 pm #

    Hi.

    I’m using coupons with usage limit per user and I’d like to display (preferably on “My Account” page) information about it. Something like: “You have used the coupon 5 out of 10 available time”

    Any chance I could sort this out with this module?

    Cheers!

    • Kento February 26, 2024 at 7:25 pm #

      Hi Serban,

      Thanks for asking, unfortunately, this particular case you describe is not covered by the plugin.

      Cheers

  2. PTCL Internet Packages June 29, 2022 at 12:43 pm #

    I have installed woocommerce plugin on my website. i was facing issue and i put above mentioned shortcodes to fix issues and i have succesfully fixed.

    • Kento June 29, 2022 at 12:51 pm #

      Great, happy selling!

  3. Kento February 8, 2022 at 1:42 pm #

    The latest WooCommerce Coupon Shortcodes release 1.23.0 is out and the information on this page has been updated to reflect the latest additions.

  4. Juan February 24, 2021 at 1:24 pm #

    Hello! I’m trying to understand this. I have multiple codes generated and I want it to show only one but not random. Just in order with no repetition. So when I a person enters the website the shortcode should read the multiple codes on woocommerce and show it in order and not random. is it possible?

    • juan February 24, 2021 at 1:26 pm #

      The code I’m using is this one: [coupon_enumerate code="*" orderby="rand" number="1" type="percent" prefix="bsf"]
      [coupon_code prefix="bsf_"]

      Prefix isn’t working I have other coupons created that no has that prefix and it is show also.

      • Kento February 28, 2021 at 5:39 pm #

        Hi Juan,

        You are indicating orderby=”rand” which will provide you with a random code from those eligible. As you mentioned ” I want it to show only one but not random. Just in order with no repetition.” this is not what you want but you should rather use orderby=”code” or not indicate that attribute at all as that is the default. You’re also missing the closing tag and mixing up some attributes. This would do what you describe:

        [coupon_enumerate code="*" number="1" type="percent"]
        [coupon_discount prefix="code"]
        [/coupon_enumerate]

        Note that you’re only showing the first one of those eligible as you’re using the number attribute. Remove that to show all or adjust as needed.

        Documentation Reference: http://docs.itthinx.com/document/woocommerce-coupon-shortcodes

        Cheers

  5. CB September 9, 2020 at 5:09 pm #

    This shortcode is not functioning properly in the latest woocommerce release: coupon_is_not_valid.
    A coupon has been set to exclude a certain category.
    But when visiting the product tied to that category, it says the coupon is valid.

    • Kento September 21, 2020 at 11:20 am #

      Hi,

      This shortcode would reveal the content it surrounds when the coupon is not considered valid. If you have excluded a product category in a coupon, then the coupon would not be valid if any product is in the cart that belongs to that category. In that case, you would see the content of the shortcode revealed. Otherwise, if you have no products in the cart or only products that do not belong to the excluded category, the coupon would be valid and the contents of the shortcode would not be displayed.

      > But when visiting the product tied to that category, it says the coupon is valid.

      It seems that you are mistaking validity features with what this extension does, I would suggest that you review your settings used on the coupon.

      Cheers

  6. Jason June 16, 2020 at 1:42 pm #

    Are there any hooks? I need to override “description”.
    [coupon_show show="description"]

    It’s currently stripping out HTML and I need it to show HTML.

    • Kento June 29, 2020 at 12:48 pm #

      Hi Jason,

      Currently there are no filters you could use to override that, but it would certainly be useful. I’ll add it as a suggested improvement which we could provide in an update.

      Cheers

  7. Jason June 7, 2020 at 2:40 pm #

    I would like the plugin to display a coupon on the product page, if it is relevant to that product page. The coupon would be an image with a click to apply link. I can imagine it looking like this:

    [coupon_enumerate code="*" orderby="rand" number="1"]
    [coupon_show show="image"]
    [/coupon_enumerate]

    I may be able to add an image field to coupons. Is there a way to add the additional “image” attribute to “coupon_show”? I see in other places you have:
    [coupon_show show="code,description,discount"]
    But I’d need to use “image”.

    • Kento July 1, 2020 at 12:08 am #

      Hi Jason,

      Nice idea, but not something you could achieve with the extension without coding it, or by using a conditional shortcode that wraps the image to display:

      [coupon_is_active code="test"]
      (your image here)
      [/coupon_is_active]

      Please have a look here http://docs.itthinx.com/document/woocommerce-coupon-shortcodes for details on that shortcode. If that doesn’t work out for your case, then you’d really have to come up with an implementation of your own 🙂

      Cheers

      • Jason July 1, 2020 at 2:25 pm #

        Thanks for you response. I would need it to be dynamic, so iterating through and selecting the appropriate coupons for the product page would be best. So I might reach out at some point. Thanks.

  8. Diane December 20, 2019 at 6:25 pm #

    I would like the coupon description to display in the Cart Totals after a coupon is entered, not just when it’s set to automatically apply a coupon. How can I achieve this?

    • Kento December 28, 2019 at 1:33 pm #

      Hi Diane,

      There is an example on http://docs.itthinx.com/document/woocommerce-coupon-shortcodes/ (look for Example for Scenario B: on the page) where the discount info is rendered using a combination of shortcodes. This can also be used with the shortcode that renders the description. You can add that to the cart page but keep in mind that if the cart content is updated dynamically using Ajax, that wouldn’t be updated unless you revisit the page. Alternatively, you can modify the cart template, in that case I guess it would also include the updated information that is included with the shortcodes.

      Cheers

  9. Mayank Gupta December 11, 2019 at 6:52 am #

    I have different coupons that are eligible for different products. Is there a shortcode that I could add on the single product page that would only display coupons that are eligible for that particular product instead of adding different coupons in each product page?

    • Kento December 11, 2019 at 1:43 pm #

      Hi,

      That isn’t possible with this extension but you could have a look at our WooCommerce Volume Discount Coupons which offers display options documented here that allow to display discount information relevant to products.

      Cheers

  10. Prachi August 17, 2019 at 6:29 am #

    Where should I place these short codes?

  11. umapriya August 9, 2019 at 12:40 pm #

    Hi,
    I want to display ONLY all VALID coupons. Pls help to modify below code.

    [coupon_enumerate code="*" type="subscription,percent"]
    [coupon_description element_tag="div" prefix="code"]
    [/coupon_enumerate]

  12. healthcare nt sickcare February 23, 2019 at 11:56 am #

    can you provide any video tutorial on how to use this plugin?
    (for non techie)

    • Kento February 25, 2019 at 9:05 am #

      Hi,

      We have the documentation for this extension here where you will find details on how to use it. It’s pretty easy to use by following the examples outlined there – you can copy and paste them easily and adjust them to the coupon codes you are using.

      Cheers!

      • Hunter February 25, 2019 at 1:56 pm #

        Can you share how to combine the enumerate and coupon is valid? I cannot get it to work.

        • Kento February 26, 2019 at 12:26 pm #

          Hi Hunter,

          I’d need to see what you were trying to do, but if you tried to combine the [coupon_enumerate] enclosing [coupon_is_valid] then that wouldn’t produce anything – these are not designed to work together that way. What are you trying to achieve?

          Cheers

          • Hunter February 26, 2019 at 2:19 pm #

            That is exactly why I was doing.

            [coupon_enumerate code="*"]
            [coupon_is_valid]
            [coupon_discount element_tag="div" prefix="code"]
            [/coupon_enumerate]

            I would like to be able to show all coupons that are valid instead of having to type out each shortcode.

            • Kento March 5, 2019 at 10:03 am #

              Hi Hunter,

              Ok, this won’t work as I explained before. But it might be interesting to allow to specify that you only want to include coupons that are currently valid based on the current cart contents to be included when rendering with [coupon_enumerate code="*"] – I’m thinking of allowing to specify an additional attribute, something like [coupon_enumerate code="*" valid="yes"] … I’ll check it, it certainly sounds useful.

              Cheers

              • Teri June 22, 2021 at 6:20 pm #

                Hello! I’m looking to do something similar to this with showing active coupons. I’m attempting this code but its not working
                [coupon_is_active][coupon_enumerate code="*"][coupon_description] // Use code [coupon_code][/coupon_enumerate][/coupon_is_active]

                Alternatively, is there another way to show non-expired coupons??

                • Kento June 23, 2021 at 12:17 pm #

                  Hi Teri,

                  Thanks for asking! We’re working on an update of the extension. Let me check if that’s a possible addition to the new release and get back to you.

                  Cheers

                • Kento June 23, 2021 at 7:37 pm #

                  FYI We’ve just released an update and have added a new shortcode [coupon_iterate] – please make sure to review the documentation page for examples: https://docs.itthinx.com/document/woocommerce-coupon-shortcodes/

                  It includes the case you have been asking for. Thanks for the suggestion, this was very useful! Hope you like it 🙂

                  • Teri June 24, 2021 at 12:52 pm #

                    This is great, thank you!
                    Another question – is there a way to show all active coupons, with the exception of some (specific for influencers, etc…)?

                    • Kento June 24, 2021 at 9:29 pm #

                      You’re welcome, this was good to add!

                      For coupons that are limited to specific user groups, I would recommend to use the premium extension Group Coupons extension. This would allow you to limit coupons to certain groups, e.g. you could create an Influencer group for coupons that could only be applied by member accounts. Then you could do this:

                      [coupon_iterate code="*"]
                      [coupon_is_active]
                      [coupon_is_valid]
                      [coupon_code] ...
                      [/coupon_is_valid]
                      [/coupon_is_active]
                      [/coupon_iterate]

                      This would only show coupons that are active and also valid for who is viewing them. With the validity restrictions imposed by the Group Coupons extension, it would only include the coupons that are valid for influencers if they belong to the Influencers group.

                      I think there is another opportunity for improvement on the WooCommerce Coupon Shortcodes plugin, so that restrictive filters such as those imposed by Groups itself on the coupon post type could be taken into account. But this will take some thought and testing which we can’t schedule right now because of other priorities. I’ll take note of it though, to revise it and make the necessary additions as soon as possible. If you think that the solution that I’ve outlined above is an option, then that’s something you could use right now.

                      Cheers

  13. Ilkar June 21, 2018 at 5:27 pm #

    Hi, i want to show, how many coupons has been used and how many left.

    Is it possible using this plugin?

    • Kento August 1, 2018 at 1:23 pm #

      Hi Ilkar,

      Thanks for asking, sorry but this isn’t possible with this extension.

      Cheers

  14. Hasan May 23, 2018 at 4:38 pm #

    Hi,

    Shortcode doesn’t show until product is added to the cart. I entered the shortcode in the product description and would like coupon text to show up if coupon is valid for the product being viewed.
    I am using the [coupon_is_valid] shortcode. How can I make the shortcode active on the product page before product is in the cart

    [coupon_is_valid code="Q2 Prorated"]AED 2,756.25 Current Q2 Prorated Price
    Subscriptions purchased after 1st of April are prorated.
    Discount will automatically apply at checkout.
    [/coupon_is_valid]

    Please advise…

    • Kento August 5, 2018 at 7:45 pm #

      Hi Hasan,

      I suppose that the coupon you use is conditionally valid based on the cart contents. The shortcode is only supposed to show the information when the coupon code is valid at the time the shortcode is evaluated. If you would like to show it when the code is not valid, then you can use [coupon_is_not_valid] instead.

      Cheers

  15. Bertie Song July 17, 2017 at 3:24 pm #

    Dear developer,

    I am not familiar with this. Our site is using AffiliateWP for all affiliates. For some affiliates, they have a discount but for others they do not. We create coupons to apply those discounts. For those who do not have, an error message of “Coupon code does not exist!” will appear. I am trying to use this plugin to override this error message. But that does not work. Any suggestions?

    Thank you!

    • antonio July 17, 2017 at 5:19 pm #

      Hi Bertie,
      This plugin doesn’t change the coupon messages. With this plugin you have available a lot of shortcode that you can use related with coupons.Please have a look at the documentation page.
      Maybe are you talking about Woocommerce Coupon Messages ?
      Kind Regards,
      Antonio B.

  16. Geoff December 20, 2016 at 1:41 pm #

    Hi Antonio

    When I disable the plugin, the hidden text becomes visible. The standard “Coupon code applied successfully.” comes up fine. When I enable the plugin, the text is hidden again and once more, the standard “Coupon code applied successfully.” is displayed rather than the hidden message.

    I hope it is not a theme issue as it is the basic storefront theme sitting on the woo commerce plugin on WordPress. All items fully updated now to WordPress 4.7, WooCommerce 2.6.9 and Storefront Theme 2.1.6.

    • antonio December 22, 2016 at 9:59 am #

      Mmmm,
      please enable the plugin, give me the url and a coupon to apply (if you want you can send me an email to antonio[at]itthinx[dot]com with this info, indicating this conversation).
      Kind Regards,
      Antonio B.

  17. GeoffatMM December 14, 2016 at 11:36 pm #

    Kento

    I am trying to get a message displayed to thank purchasers for using the coupon which then issues a donation to a charity.

    The code does work but only when I refresh the page AFTER the code has been applied. So if in the cart page I apply the code, no message appears but if I then refresh the page it does appear. The same thing happens on the checkout page.

    At the moment I have it set on the checkout page in the hope that the coupon is used on the cart page. When that is done and the customer moves to the checkout page the message displays correctly. However, if the coupon is then removed, the message once more remains until the page is refreshed.

    It seems that the code is not recognising that the coupon has been added and the page refreshed (the “Coupon code applied successfully.” banner comes up but not the short code message).

    It does say that the plugin has not been tested with my version ) WordPress 4.5.3, WooCommerce 2.6.2 and Storefront Theme 2.0.5

    Any guidance appreciated.

    • antonio December 20, 2016 at 9:52 am #

      Hi GeoffatMM,
      please try to disable the plugin and check if when you set a coupon in the cart page, the default message “Coupon code applied successfully.” appears. Maybe it’s theme problem.
      Kind Regards,
      Antonio B.

  18. James Rivas November 23, 2016 at 10:04 pm #

    Hello,

    I don’t know how often this happens but I installed the plug in to the my site and then I refreshed the page and I got this in return:

    Fatal error: Access level to SYN_Shipping_Method::get_field_default() must be public (as in class WC_Settings_API) in /home/raulme5/public_html/(myusername)/wp-content/plugins/synmedia-woocommerce-shipping-ups/syn-shipping/class-syn-shipping-method.php on line 707

    That is all the is showing up.
    I can’t log into my page any more or see it for that matter.

    I want to know how I can undo the installation or what I can do to fix the problem.

    • antonio November 24, 2016 at 10:35 am #

      Hi James,
      This seems a problem with the synmedia-woocommerce-shipping-ups (maybe you have a low memory limit, you can check this from Woocommerce->System Status).
      To disable the plugin, you could access using the FTP, and delete the plugin folder. Then you should can access.
      Kind Regards,
      Antonio B.

  19. EA September 16, 2016 at 4:18 pm #

    Im really not trying to be stupid…but I am trying to add “[coupon_description] where do I input the shortcode….the cart page? I added a coupon and already made a description. please help

    • antonio September 16, 2016 at 6:35 pm #

      Hi EA,
      really you can set the shortcode in posts/pages or using do_shortcode you can set the shortcode in your theme code.
      Maybe the documentation page can help you.
      Kind Regards,
      Antonio B.

  20. Aharon September 11, 2016 at 3:53 pm #

    Hello,
    I’m trying to use this plugin with “do_shortcode” function but it doesn’t work .
    seems like it doesn’t work also when I’m using it in a regular post or page with WordPress editor
    Do you know what could be the problem?

    • antonio September 12, 2016 at 10:20 am #

      Hi Aharon,
      the ‘do_shortcode’ function is used in PHP code. If you need to use the shortcodes from the WordPress editor, simply write them, ex.
      [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]
      [/coupon_is_valid]

      Please be sure that you are in the ‘Text’ tab in the editor.
      Kind Regards,
      Antonio B.

  21. 70599 September 5, 2016 at 6:36 pm #

    Does not show coupons on the top page until opening the cart page.
    Once the cart page was opened, coupons can be displayed on the top page.
    Any ideas?

    My code:

    <?php
    $coupon_id = array('abc','def');
    foreach($coupon_id as $id){
    echo do_shortcode('
    [coupon_is_valid code="'.$id.'"]
    [coupon_code code="'.$id.'"]
    [coupon_description code="'.$id.'"]
    [/coupon_is_valid]
    [coupon_is_not_valid code="'.$id.'"]
    No coupons available now.
    [/coupon_is_not_valid]
    ');
    }
    ?>

    • Kento September 6, 2016 at 8:40 am #

      Hi,

      This would be because the coupons aren’t valid unless there is something in the cart they can be applied to. Does that make sense in the test scenario you have been trying?

      Cheers

      • 70599 September 29, 2016 at 11:25 am #

        Thanks.

        In my scenario, I would like to show all the coupons that useable to users, before anything added to the cart.
        I have a showcase for these coupons.

        Is this doable?

        Thanks again.

        • Kento October 3, 2016 at 10:19 am #

          Hi,

          If you don’t want to make it dependent on whether the coupons are valid at the time they should be displayed, then you could simply remove the [coupon_is_valid] shortcodes wrapping the display shortcodes. But maybe in your case it would be simpler to just show the coupon codes that are available without using any shortcodes at all?

          Cheers

  22. Alexey July 22, 2016 at 9:11 pm #

    Hi Antonio

    I’m having difficulty displaying coupons via your shortcodes on cart page.

    for example:

    [coupon_is_valid code="456000"]
    We’ve got a discount for this product, yay! Use the coupon:
    [coupon_discount element_tag="div" prefix="code" prefix_separator=": "]
    [/coupon_is_valid]

    displays the coupon when the associated product is in the cart, great. But it only works for that specific coupon number.
    What if i have a lot of coupons for all variable products and need to display available coupon that’s tied in with the products in the cart? basically do the above but include all the available coupons.
    Because replacing the coupon code number with ( * ) doesn’t do anything.

    Any thoughts?

    • antonio July 25, 2016 at 8:02 am #

      Hi Alexey,
      you can use coupons separated by commas, but you need to set every coupon.
      It seems an interesting option, we will review this.
      Kind Regards,
      Atonio B.

  23. anu June 29, 2016 at 5:17 am #

    valid short code not working

    • antonio June 29, 2016 at 7:55 am #

      Hi anu,
      exactly what shortcode are you using?
      Kind Regards,
      Antonio B.

  24. Tushar Sharma May 24, 2016 at 5:19 am #

    Hello, I’ve opened a thread. I thought I’d post here in case you don’t get notified.
    https://wordpress.org/support/topic/excluding-private-coupons

    • antonio May 24, 2016 at 7:46 am #

      Hi Tushar,
      you could use the ‘element_tag’ attribute on the coupon_description and coupon_discount shortcodes (sorry, coupon_code hasn’t this attribute). Maybe if you play with the ‘coupon’ span class you can get what you want.
      Kind Regards,
      Antonio B.

  25. Orlando May 4, 2016 at 7:35 am #

    Hello, is there any way to show the number of coupons left? eg: I’ve got a promotion going for a few days where users who use a coupon get a special item as a gift, but I limited the coupons to 10 units. Is there any way to get the number of coupons left?

    Thanks!

    • antonio May 4, 2016 at 2:00 pm #

      Ho Orlando,
      Sorry, right now this option is not available.
      Kind Regards,
      Antonio B.

  26. Steve March 22, 2016 at 8:10 pm #

    Sorry for the basic question – how do I add the shortcode to the checkout page? Do I edit the form-coupon.php, & will this get overwritten if Woocommerce upgrades?

    • antonio March 23, 2016 at 9:51 am #

      Hi Steve,
      If you need to override the checkout page, this post can help you.
      With do_shortcode you can add shortcode in your php files.
      Maybe you don’t need to modify the php file, and you can use the filters. This post can help you.
      Kind Regards,
      Antonio B.

  27. Denislav September 18, 2014 at 6:59 pm #

    Is it possible to filter the Registered users by ID and show them coupons assgned to them

    • kento September 20, 2014 at 6:38 pm #

      Hi Denislav, currently not, see the documentation for details on the current capabilities please.

  28. Bernice July 18, 2014 at 1:46 pm #

    I is there a way to create a list of all coupons that gives

    the code(in bold)and the description

    Currently I’m using enumerate but it’s spaced and I want to add to wording in between.

    • kento July 18, 2014 at 6:57 pm #

      Hi Bernice, here’s an example:

      <div class="the-coupons">
      [coupon_enumerate code="*" type="subscription,percent"]
      [coupon_description element_tag="div" prefix="code"]
      [/coupon_enumerate]
      </div>

      <style type="text/css">
      .the-coupons .coupon.code {
      font-weight: bold;
      }
      </style>

      • Bernice July 18, 2014 at 11:07 pm #

        Perfect…. I even added color to the style type area. Thanks!

  29. James February 21, 2014 at 6:46 am #

    Hi,

    its just to translate it into french. What file should I add to the folder ?

    Thanks 🙂

    • kento February 23, 2014 at 10:53 am #

      Hi James, would you like to contribute your translation? It would have to be added to the lib/languages folder inside the plugin.

  30. James February 19, 2014 at 5:44 pm #

    Hi !
    Thanks for the plugin !
    How can I translate or change the text “Discount” ?

    Thanks 🙂

    James

    • kento February 20, 2014 at 12:06 pm #

      Hi James,

      You would place your translation files in the plugin’s lib/languages folder, or do you need a filter that hasn’t been added yet?

  31. Brad Ungar January 28, 2014 at 1:01 am #

    Been trying to use the “enumerate” short code to list all of our current coupons on a page, but they are not showing anything. I have coupons created and using the code:

    [coupon_enumerate code="*" type="percent"]
    [coupon_discount element_tag="div" prefix="code"]
    [/coupon_enumerate]

    Thanks!

    • kento February 1, 2014 at 11:03 am #

      Can we have a look at how you have the coupons set up on the admin side? You can provide access to support at itthinx dot com.

  32. Guy November 24, 2013 at 4:57 pm #

    Hi,
    I’d like to be able to display a voucher box in the Admin Order screen and then input a coupon if needed. Otherwise just display the on-line order coupon if there is one.
    Is that possible?
    Thanks
    Guy

    • antonio November 25, 2013 at 10:34 am #

      Hi,
      you can use Meta box plugin to add metaboxes. To create your personal metabox, this post can help you (you must use ‘shop_order’ on ‘pages’ atribute to show the metabox on Woocommerce order).
      cheers

  33. Frank November 24, 2013 at 4:35 pm #

    Hi Kento
    Thanks for Sunday feedback ;-).
    From the documentation I understood that[coupon_code] etc can be used on their own as well.
    However, on my (test-)page I use [coupon_code] directly followed by [group_coupons]. The last one shows correctly the valid coupon while [coupon_code] brings the Warning.
    That’s why I believe there is somehing else wrong.
    Thank you and best regards,
    Frank

    • kento December 2, 2013 at 9:29 pm #

      Hi Frank, I assume with the update released this now works for you as expected. Please let me know if not. Cheers

      • Frank December 3, 2013 at 10:22 am #

        Hi Kento

        Yes, I don’t see the warning message anymore.

        But in my implementation I don’t see [coupon_code] displaying anything:
        I use the plugin group-coupons to automatically appoint a coupon to group members and a certain product. By doing this I have a discount for already subscribers to modivate them to subscribe for a 2nd product.

        On top of my checkout page I can see the coupons with
        [group_coupons auto="yes" groups="yes" show_cart_invalid="false" show_discount="yes"]

        But next to it I have no display of the same coupons using [coupon_code]

        I would prefer using [coupon_code] because it gives me more flexibility. However, in my case it doesn’t display anything.

        I hope I could explain this scenario well enough. Let me know if you need more background.

        Thanks and best regards,
        Frank

        • kento December 4, 2013 at 1:31 pm #

          Hey Frank,

          What you describe sounds ok, but are you supplying any codes to the [coupon_code] shortcode? The way [group_coupons] works is different from [coupon_code], as the latter needs to be fed coupon codes, either by attribute or by using surrounding shortcodes.

          I think you’re basically looking for this:

          [coupon_is_applied]
          [coupon_description]
          [/coupon_is_applied]

          You can fine-tune that, see http://www.itthinx.com/documentation/woocommerce-coupon-shortcodes/

          Cheers

  34. Frank November 23, 2013 at 12:29 pm #

    Hi Kento

    I tried out WooCommerce Coupon Shortcodes because I like the conditional display of coupons.
    I tried out very simple with [coupon_code],[coupon_description] and [coupon_discount].
    But I get following error message:
    “Warning: Invalid argument supplied for foreach() in /home/…/wp-content/plugins/woocommerce-coupon-shortcodes/lib/views/class-woocommerce-coupon-shortcodes-views.php on line 655” for [coupon_discount].
    ” … line 529″ for [coupon_code] and ” … line 580″ for [coupon_description].

    Other Plugins I’m using (just listed the ones i believe are involved; all on latest release):
    – Groups
    – Groups Woocommerce
    – WooCommerce
    – WooCommerce Deutsch (de_DE)
    – WooCommerce Coupon Shortcodes
    – WooCommerce Group Coupons
    – WooCommerce Multilingual
    – WooCommerce PDF Invoices
    – WooCommerce Subscriptions

    Is the problem related to fact that I’m using Coupons together with subscriptions?

    Thank you for your help and best regards,
    Frank

    • kento November 24, 2013 at 2:49 pm #

      Thanks for pointing that out Frank, the Warning is displayed because the shortcode expects at least one code to be passed. See the documentation for details on how to supply the codes so that the shortcodes can display coupon info appropriately.

      The thing with the Warning issued should be fixed though.

  35. Guy November 18, 2013 at 10:06 am #

    Hi,
    We do a lot of offline orders when customers telephone us with their order and we use the woocommerce Admin Order page.
    Can you help me as we want to be able to enter coupon codes on the Admin Order screen?

    Kind regards Guy

    • kento November 18, 2013 at 6:11 pm #

      Hi,

      It depends on what you want to achieve, how do you want to use the shortcodes that the plugin provides in relation to the manual process?

Leave a Reply

We use cookies to optimize your experience on our site and assume you're OK with that if you stay.
OK, hide this message.

Affiliates · Contact · Jobs · Terms & Conditions · Privacy Policy · Documentation · Downloads · Useful Plugins · My Account

Share