Skip to content

Pending payment (on payment failure) signs up WP account #479

@robin-scott

Description

@robin-scott

Affected ticket(s)

NA

What I expected

WooCommerce set to "Enable customer registration on the "Checkout" page."

Unless payment completes, user account should not be signed up.

What happened instead

In live mode, WooCommerce Stripe 4.0.1 (4.0.3 too) signed up a user account on a failed payment attempt (incorrect zip code), which was a "pending payment" order. This user saw payment fail, but a user account was setup (along with relevant transactional and login emails) and therefore was not sure if payment had worked and hit support.

Steps to reproduce the issue

  • Setup WooCommerce and Stripe plugin.
  • Set WC to only allow registration on checkout.
  • Complete checkout in live, as a new user, but use a bad card (say out of date)

image

CARD DECLINED it says - but, the user account has been created.

image

User has been sent all the usual new account stuff. Which in our case also includes login stuff for the LMS. Now, we can change this part, but this feels like it may not be ever desirable?

NOTE - I am aware this is edge case and normally "why does that matter?!" would be the question. In this case, user completing payment and gaining access to WordPress and an LMS is a part of the initial order process. The new user account should only be signed up after the payment is completed - with this gateway - I feel.

Whether that makes it a bug or an enhancement... hmm.

For sure, it would be "nice to have" if the user account did not get signed up when payment just failed, as [in our and many other cases] this triggers a confusing email to customer with their new login details, and this contradicts for them with the message showing payment failed.

Will be able to dig into this a bit with a PR later this week.


  • Issue assigned to next milestone.
  • Issue assigned a priority (will be assessed by maintainers).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions