Open ecairol opened 1 year ago
Thanks for the report @ecairol - this could cause confusing issues, marking as high priority.
This issue could be caused by the fact that the localhost site is connected to the WCPay account, and it shouldn't be.
If multiple sites are connected to single WCPay account, this causes issues. WCPay has Safe mode
to protect against these issues.
@ecairol Is this deletion happening on a localhost/staging site in Safe mode?
Thanks, @haszari
It seems that my localhost site has WCPay is in Test Mode, but not in Safe Mode. See screenshot below:
Thanks for clarifying @ecairol . I see a Safe mode
banner (top right in your screenshot) which suggests that the deletion happened in Safe mode - which is worth investigating, could be a bug.
Thanks, @haszari! I'm not sure if that Safe mode
banner is confirming that the site is currently in safe mode, or if it's a CTA to move to Safe Mode (I believe the latter)
However, even if this isn't a bug, from a UX perspective I'd highly recommend putting a Warning banner or Alert when a User is going to be deleted, letting the user know that there will be irreversible destructive actions outside of WordPress, in this case impacting (for instance) Subscriptions.
I'm not sure if that Safe mode banner is confirming that the site is currently in safe mode, or if it's a CTA to move to Safe Mode (I believe the latter)
Thanks for clarifying! Perhaps that banner should be clearer 😁
However, even if this isn't a bug, from a UX perspective I'd highly recommend putting a Warning banner or Alert when a User is going to be deleted, letting the user know that there will be irreversible destructive actions outside of WordPress, in this case impacting (for instance) Subscriptions.
That sounds reasonable, though maybe is a different issue. I'm not sure what's reasonable or expected here. I would naively expect that deleting a user would be a bad idea when there are subscriptions, but maybe we can add more protections here.
discussed in HE ridealong. this was fixed in https://github.com/woocommerce/woocommerce-gateway-stripe/pull/2672 - can we look at that fix and bring it into WooPayments.
Comment by @dougaitken
Describe the bug
Given a user with a WooCommerce subscription and a Payment Method stored in Stripe, if WordPress site is cloned to a localhost, and the User is deleted on that localhost instance, the pm_token is detached on Stripe in Production.
To Reproduce
Actual behavior
The Stripe Dashboard shows the customer with their payment method empty
Screenshots
Expected behavior
The payment token should remain untouched, or at least, a Confirmation screen should alert the user that there will be changes happening outside of WordPress.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context