It seems that when placing an order with a shopping cart rule coupon with limited usage, after cancelling, the usage is not decremented.
Steps to reproduce
Create a shopping cart rule with limited usage for customer (example: 1 use per customer)
Use the discount code in the checkout
Cancel the order / do not finish payment
Two scenarios:
a) When cancelling the order in the payment process, you will be redirected to the cart and you can't use the coupon again|
b) When not finishing, Pay will send the cancel request after some time, but you can't use it afterwards
If the merchant manually cancels the order from the backend, the decrement is done successfully.
Possible fix
Use the function cancelOrder in Magento\Sales\Model\Service\OrderService . This calls for the decrement function.
Extension version: 3.4.2 Magento: 2.4.5-p2
It seems that when placing an order with a shopping cart rule coupon with limited usage, after cancelling, the usage is not decremented.
Steps to reproduce
If the merchant manually cancels the order from the backend, the decrement is done successfully.
Possible fix Use the function
cancelOrder
inMagento\Sales\Model\Service\OrderService
. This calls for the decrement function.