• Hi Jeroen,

    Since I upgraded to WooCommerce 3.9 all of our auto-generated coupon codes no longer work. They get applied in the cart at checkout just fine, but when the final payment is trying to go through, it stops and says: “Coupon 0rru-lgpx-8cmd was used in another transaction during this checkout, and coupon usage limit is reached. Please remove the coupon and try again.”

    So, I edited that coupon and simply clicked save and it worked with no problem.

    I then did some looking at the posts_meta table to see what had changed.

    Here is a screenshot of before: https://cloud.madebysprung.com/L1ukloD6

    Here is a screenshot after it is saved: https://cloud.madebysprung.com/RBuX25rg

    Can you tell me how we can fix this? I don’t want to go through thousands of autogenerated coupons and resave them. ??

    Thanks!

Viewing 15 replies - 1 through 15 (of 18 total)
  • I am having the same issue on a site

    Thread Starter claydough

    (@claydough)

    Jeroen, can you let us know how to resolve this?

    Hello @claydough and @espressivo You can use the following code to slove your problem.

    // Disable the woocommerce_hold_stock_for_checkout.
    add_filter('woocommerce_hold_stock_for_checkout',  'mwb_disable_hold_stock_for_checkout');
    /**
    * Disable the filter
    * @name mwb_disable_hold_stock_for_checkout
    */
    function mwb_disable_hold_stock_for_checkout(){
     return false;
    }

    @mohitmishra is this a code snippet for function.php?

    Hello @gw808092 Yes you have to put this code in the functions.php.

    Thread Starter claydough

    (@claydough)

    Thanks @mohitmishra,

    Can you tell me why this solves the issue and what it is doing? I appreciate it.

    Thread Starter claydough

    (@claydough)

    Also @mohitmishra … this solution worked perfectly. ??

    Thank you, it works perfect with the coupons on a desktop. But on a mobile it is not possibe to put anything in the basket. Any idea?

    hello @danielvanhoogen I think any other plugin is conflicting with your plugin. So check this issue after deactivating all the plugin expect the Woocommerce plugin and try to activate them one by one.

    Hello @claydough There is an update in the Woocommerce that will save one new metadata during the generation of the coupon and the plugin which you are using to generate coupon that is not saving that metadata during the generation of the coupon so that you were not able to do the checkout after applying the coupon on the checkout.

    same issue here but not even using this plugin. I just happen to come across this while searching. The function does correct this issue and I have reported it to woocommerce. thank you for the solution!

    @berkmh Can you please share screenshot of the issue which you are facing during the checkout?.

    One of my clients that use auto generated coupons has the same issue. The fix mentioned above worked.

    Discovered the same issue after updating to WooCommerce 3.9. Lost 2 sales (that I know of — true number probably 5 or 6). Coupon is applied to cart, shows proper discount, but when customer goes to pay gets the error message:

    Coupon bzlqkwllakrs72ha was used in another transaction during this checkout, and coupon usage limit is reached. Please remove the coupon and try again.

    I don’t use the plugin the OP mentioned, so I believe this is a bug in WooCommerce core. I will try the fix posted. Many thanks to @mohitmishra for posting a workaround. Does anyone know if this has an official Issue # yet?

    @anthonyz747 This is not an official issue. You will not face any issues with the coupons which are generated through the woocommerce plugin but if any other plugin is generating the coupon by using the woocommerce plugin functionality then you will face this issue.
    The reason behind that is WooCommerce added new functionality that is a coupon can not be used at two transactions at the same time. So what We have done is We disabled that functionality using filter(code above). There is another solution for this you can reach out plugin support( whose coupon is not applied on the checkout page) to fix this issue. I have code to fix this issue also but that will flush out when you update the plugin.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Auto Generated Coupon Code not working’ is closed to new replies.