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.
And both of you have disabled your plugins, especially your security ones?
Are you all creating the order too or is it an order that’s in processing?
Yes we do create order from the admin side for offline sales. Just to record and keep everything in sync.
ok thanks. I was able to replicate this on my end too.
I can confirm this is a known bug. It’s being worked on
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.
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!
Awesome sauce ๐๐ผ๐ค๐ผ