• Resolved fotske

    (@fotske)


    Hi,

    There is a problem: if a client uses a coupon code that has a limit of 1 use by user on the Checkout but that the payment fails (for example the payment by credit card fails because the person did not go until the end of the credit card verification process) and if this person then tries again to make the payment, then there is a message at the Checkout telling that the coupon code has already been used for another order but it is not true since the order failed.
    So the person should still be able to use the coupon code.
    Could you please solve this bug at the Checkout?

    Thank you very much in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hey @fotske,

    When a payment fails, an order is still created. If it’s set to “pending payment” then the user can still pay for the order from the orders section of their account. Because of that, the original order is taking up one use of that coupon. It will have to be canceled before the coupon can be used again.

    You can manually cancel the order. You can also shorten the amount of time pending payment orders remain pending before they cancel automatically. You can find that setting by going to WooCommerce > Settings > Products > Inventory. There is box here for the “hold stock” setting. You can set the number of minutes a pending payment order will remain pending before it automatically cancels.

    pending

    You can pick a small number of minutes if you’d like these to cancel quickly.

    If you have any questions, let us know.

    Take care

    corsonr

    (@corsonr)

    Automattic Happiness Engineer

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Problem with the coupon codes when the payment fails’ is closed to new replies.