• Resolved mdynani

    (@mdynani)


    i created a coupon couple of months ago with unlimited usage per coupon and unlimited usage per user.

    Last usage was couple of weeks ago.

    But when i want to apply the coupon at new order, it pop an alert “Coupon usage limit has been reached”

    i am on WordPress 5.2.1 & Woocommerce 3.6.4

Viewing 11 replies - 16 through 26 (of 26 total)
  • Thread Starter mdynani

    (@mdynani)

    Hi @serafinnyc . I notice the issue arise only after latest update. Before that i can use the coupon as usual. Btw itโ€™s the same set of plugins used before the error arise.

    Tested on shop frontend

    As what @lehacarpenter mention, yes it works from shop front end, but throw coupon exceed limit error when applying at the back end using add order.

    Stef

    (@serafinnyc)

    And both of you have disabled your plugins, especially your security ones?

    Stef

    (@serafinnyc)

    Are you all creating the order too or is it an order that’s in processing?

    Thread Starter mdynani

    (@mdynani)

    Yes we do create order from the admin side for offline sales. Just to record and keep everything in sync.

    Stef

    (@serafinnyc)

    ok thanks. I was able to replicate this on my end too.

    Great! Thank you.

    Stef

    (@serafinnyc)

    I can confirm this is a known bug. It’s being worked on

    Stef

    (@serafinnyc)

    Sorry, I read that wrong. The fix was actually issued. So there are two things you can do. You can either replace the file I stated earlier, wait for a new release or you can add this

    You’ll want to go to the same file and replace this for that.
    woocommerce > includes > abstract > abstract-wc-order.php

    Look for
    if ( $usage_count >= $coupon->get_usage_limit_per_user() ) {

    and change to

    if ( ! empty( $usage_count ) && $usage_count >= $coupon->get_usage_limit_per_user() ) {

    on my copy it was on line 961 but you can copy the top and do a FIND

    Any questions let me know.

    • This reply was modified 6 years, 6 months ago by Stef.
    Thread Starter mdynani

    (@mdynani)

    Glad that is has been fixed.

    ill just wait for the next release available.

    Thanks @serafinnyc . Have a great day.

    I went to Github and pulled the fixed file from there, because I did not have the one from the previous version. It worked great. ๐Ÿ™‚

    Thanks again, Stef!

    Stef

    (@serafinnyc)

    Awesome sauce ๐Ÿ™Œ๐Ÿผ๐Ÿค™๐Ÿผ

Viewing 11 replies - 16 through 26 (of 26 total)

The topic ‘Coupon Exceed limit error with unlimited usage configured’ is closed to new replies.