WooCommerce Coupon Exclusions

WooCommerce Coupon Exclusions

WooCommerce Coupon Exclusions is a powerful and easy to use WooCommerce extension which provides extended coupon usage restrictions.

This WordPress plugin allows to restrict the validity of a coupon based on other coupons applied. It also allows to remove specific coupons when a coupon is applied.

It provides a new Extensions section for coupons. This new section features the following restriction facilities when a coupon is edited:

  • Exclude : One or more coupons can be chosen, the coupon is invalid if any of the chosen coupons are applied to the cart.
  • Remove coupons : The coupons chosen here are removed if the coupon is applied to the cart.

Exclusions combined

Documentation

Please visit the Documentation page for this extension.


Comments

38 responses to “WooCommerce Coupon Exclusions”

  1. Hi. We bought this plugin in codecanyon. It is now removed from there.

    As we need this plugin, 2 questions:

    1) have you make it compatible with woocommerce HPOS?
    2) if yes, how can we get the updated version with hpos compatibility?

    Thx.

    1. Hi David,

      Thanks for asking! We are going to release an update for HPOS compatibility shortly. The extension is available exclusively via our shop https://www.itthinx.com/shop/woocommerce-coupons-countdown/ and has since already been revised substantially. If you would like to read about why we removed it from CC, we wrote about that in https://www.itthinx.com/2021/11/16/make-it-sustainable/

      Cheers

  2. Thanks for giving information about WooCommerce Coupon Exclusions

  3. Hi.

    We have installed this plugin and the exclusion is working in cart but it is not working when it is added in admin.

    Thanks.

    1. Hi Charm,

      Thanks for using our tool! It’s not intended to control exclusions on coupons entered in the back end.

      Cheers

      1. Hi, Kento.

        Is there a way to resolve this? And have the invalid coupon showing in the back end because we also do not want the order management team to use the coupons together.

        Thanks.

        1. Hi Charm, I understand your case but this is basically impossible to avoid because coupon codes can be input freely on the backend. I don’t see how we could include a way to avoid it in the extension.

  4. Hello, does this plugin work with Smart Coupons >> https://woocommerce.com/products/smart-coupons/?

    Thank you.

    1. Hi,

      I think they should work together, worth a try.

      Cheers

  5. Coupon Exclusions was working well for me, but some recent update of either the plugin or WooCommerce has made it absurdly slow. Specifically, if I go to the WooCommerce > Coupons admin page and click on any coupon code, it takes about a minute to load the page. If I turn off Coupon Exclusions, the coupon loads instantly. I’ve tried turning off all plugins except WooCommerce and Coupon Exclusions, and the behavior is the same. I don’t know exactly when the change took place, but when I started using Coupon Exclusions last year, this problem did not exist. These delays are unbearable. I’ve tracked it down to the two identical lines 173 and 193 in class-woocommerce-coupon-exclusions-coupon.php, the problem being that since I have over 20,000 coupons, those lines result in 20,000 database queries. Is there any hope for a solution?

    1. Hi Joe,

      Many thanks for pointing out the issue! Yes, it seems that this would be a problem if you have that many coupons and we need to issue a fix for that. A revised version will be released as soon as possible. Thanks for your patience!

      Cheers

      1. Any progress on this change? Still struggling with extreme slowness, and adding more coupons all the time!

        1. Hi Joe, yes we’re going to release an update after concluding compatibility tests with the upcoming WooCommerce 4.5. Thanks for your patience!

          1. Andrew Aversa Avatar
            Andrew Aversa

            Has this been fixed? My store also has tens of thousands of coupons, and I would love to get this plugin as long as it won’t drag down performance.

            1. Hi Andrew,

              Yes, we have prepared an update which is just being released.

              Cheers

              1. Based on what Joe said, 20 seconds to edit a code is not going to work for us. Right now it takes 1 second to edit a coupon on our site. We have 28,000 coupons and more are generated constantly.

                I’m not sure why this plugin would ever need to search all possible coupons unless the user explicitly needs to search. Why not just let the user type in a specific coupon name? This seems like essential functionality. We have 200k users in our database and editing orders is still lightning fast because of how WC implements their search.

                1. Hi Andrew,

                  > Why not just let the user type in a specific coupon name?

                  That’s what we’re considering for the next release.

                  Cheers

          2. Joe Kissell Avatar
            Joe Kissell

            With version 1.4, performance is dramatically faster. Now I have to wait only about 20 seconds to edit a coupon code rather than 60+. That’s still about 18 seconds longer than it should be, but it’s now at least tolerable.

            1. Hi Joe,

              Thanks for the data and for your patience! It still takes a bit due to the fact that the coupon codes are being all pulled in to be offered as options in the fields. Way better than before where the thing was going through more complicated but unnecessary ways … I guess we could tackle the wait by just using AJAX fields that let you search for codes instead of including them all. Taking note for a future update.

              Cheers

  6. Can I used it together with WooCommerce Extended Coupon Features plugin and make both work together?

    For instance: Create a group of coupons with WC Extended Coupon and the apply the restrictions/exclusions with this one. Will it work?

    1. Hi Andrei,

      Thanks for asking, I’m not sure if they will work together but it might be worth a try. I think you’ve also posted on CodeCanyon with more details here so I will have a look and reply there …

      Cheers

  7. Hi,

    If an item is on sale and then a coupon code is used will it override the sale price and apply the coupon instead?

    Thank you!

    1. Hi Catherine,

      Coupon exclusions don’t override sales prices, this is used to exclude some coupons being used when others are applied.

      Cheers

  8. Dexon Lee Avatar
    Dexon Lee

    Hello,
    I’m looking for some minor changes for this plugin.

    1) Notification message for invalid coupon.
    For current message is :”Coupon is not valid.”
    The user might think that the coupon code might be wrong or something else. My suggestion is modify the message like :
    “Coupon {newly key in code} is not valid in conjunction with {current used code}. Please remove {current used code} to use {newly key in code}.”

    2) Notification message for remove coupon.
    Current version removing the coupon will not showing any message. My suggestion is add a notification message like:
    “Coupon {current used code} is removed as it cannot apply with {newly key in code}.”

    Those message is to avoid the conflict with the customer as they might not (actually is never) read the T&C of the coupon.
    I hope you will consider my suggestion and include it in next few update.

    1. Hi Dexon,

      Thank you very much for the suggestions, I will check if we can add these improvements and consider them for an upcoming release.

      Cheers

  9. Would love to see capability added where we can Exclude a group of users or a group of coupons. Use case is we need to identify customers who have already purchased to exclude them from using the coupon.

    Second use case, more important one, is to exclude a group of coupons as opposed to individual coupons from use. We have to allow coupon stacking for our affiliate coupons which means that customers can stack affiliate coupons giving them greater discounts. We can group all the affiliate coupons together but need a way to exclude the affiliate coupons from each other.

    There’s no way to copy the entire affiliate list to the exclude field either which is a problem.

    1. Hi DPG,
      Your proposals sound very interesting. I send them to check them for future updates.
      Thank you very much for the contribution.
      Kind Regards,
      Antonio B.

      1. Was there a fix to this? Thank you

        1. Hi there,

          I believe that our WooCommerce Group Coupons extension is what you are looking for.

          Cheers

  10. I have had the Coupon Exclusions installed and working since January and have a fairly complex arrangement of coupons based on products purchased and they are setup in a hierarchy where once the customer selects a product in the higher discount coupon eligibility criteria, the previously auto-applied coupons would be automatically removed using this exclusion plugin. Today it stopped working and now am getting an “invalid coupon” for the coupons that the exclusion rules are supposed to – and USED TO – remove. The invalid coupons don’t show up in the bottom section of the cart – the valid ones do as appropriate – but the invalid ones are somehow still attached and the invalid status makes it impossible for customers to checkout. I just renewed my support, so I am hoping to get a response asap.

    1. …nevermind. I figured it out. I have not confirmed that it was actually working under the conditions that caused the error. I just assumed it was because it had been tested.

      1. antonio Avatar
        antonio

        Perfect 🙂

        1. Ken Priest Avatar
          Ken Priest

          Well I spoke too soon. As it turns out, the coupon that is supposed to be removed (via the exclusion) is still in play, but flagged invalid. I only have a work-around now of setting it to “individual use only” but that won’t work in a few weeks when I need it to work with other manual coupons. I don’t understand how this suddenly stopped working properly when there have been NO changes or updates to anything.

          1. antonio Avatar
            antonio

            Hi Ken,
            Please can you give me an example of use? So I can test it.
            Thanks,
            Antonio B.

            1. Ken Priest Avatar
              Ken Priest

              I figured out what caused it to break after it had been working for months. My client wanted to remove the coupon code fields from the cart and checkout pages, so I had this code in the functions.php:

              // hide COUPON field on cart page – Comment Out when coupons are in season!
              function hide_coupon_field_on_cart( $enabled ) {
              if ( is_cart() ) {
              $enabled = false;
              }
              return $enabled;
              }
              add_filter( ‘woocommerce_coupons_enabled’, ‘hide_coupon_field_on_cart’ );
              // hide coupon field on checkout page
              function hide_coupon_field_on_checkout( $enabled ) {
              if ( is_checkout() ) {
              $enabled = false;
              }
              return $enabled;
              }
              add_filter( ‘woocommerce_coupons_enabled’, ‘hide_coupon_field_on_checkout’ );

              When I commented the code out to enable the coupon code entry for one of the two times he offers customer entered coupon discounts to be used in conjunction with the automatic discounts. But with that code commented out, the “Invalid Coupon” comes up when auto coupon conditions overlap. Before I realized it was that code causing it, I was able to stop it by enabling the “Individual Use Only” option on those specific coupons causing the error.

              So – – the coupons that error when they overlap with the conditions of what should be overriding coupons have their exclusions set.

              I purchased and installed the coupon extension “Coupon Messaging” to be able to determine which coupons were triggering the error (it used to just say “coupon is invalid”).

              Bottom line is that I need to be able to turn OFF the individual use box and allow these coupons to be used with a customer entered coupon code, as well as to have the coupons be “removed” automatically when the higher priority coupons apply. As I mentioned, it’s a very complex set of discounts and took me a long time to make it work to the extent that it does. I can give you access to the development server if you email me directly.

              1. antonio Avatar

                Hi Ken,
                If you want to hide the coupon fields, you could use CSS or overriding the woocommerce pages in your child theme. I think that the filters that you have used have side effects.
                Kind Regards,
                Antonio B.

                1. Hiding the coupon fields is not the problem – I can do that, but the problem is that I can’t use a customer entered code IN CONJUNCTION WITH an auto-coupon if I have that auto coupon set to individual use only because it errors (invalid due to exclusions) when it’s qualifying products are in the cart with the overriding coupon’s qualifying products. Bottom line is that the INVALID COUPON error should not show when a coupon is auto-applied and then overridden by the exclusion setting of another coupon.

                  1. antonio Avatar

                    Hi Ken,
                    Are you using any plugin to auto-apply coupons?
                    If you send me an example of coupons and their settings to antonio[at]itthinx[dot]com I’ll try this scenario (if you want, you can send me dashboard admin settings)
                    Kind Regards,
                    Antonio B.

Leave a Reply

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

Share