Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Split PE] Deleting APM tokens from My Account > Payment method doesn't delete the token in Stripe. #2898

Closed
mattallan opened this issue Feb 14, 2024 · 1 comment
Assignees

Comments

@mattallan
Copy link
Contributor

Describe the bug
While on checked out on the fix/2872-dPE-APM-subscription-support branch (#2883), deleting an APM saved card (i.e. ideal) doesn't remove it from Stripe.
The next time the customer's cards are fetched from Stripe to sync to Woo, the deleted tokens are re-added back.

This issue is caused by WC_Stripe_Payment_Tokens::woocommerce_payment_token_deleted() not working properly when UPE gateway is enabled and the token is anything other than 'stripe'.

To Reproduce
Steps to reproduce the behavior:

  1. Checkout fix/2872-dPE-APM-subscription-support branch
  2. Enable Woo Subscriptions
  3. Enable an APM method (ideal, SEPA, etc)
  4. Purchase a subscription product using iDeal
  5. Confirm the new iDeal token is saved in your wc_woocommerce_payment_tokens table
  6. Navigate to the Stripe dashboard (https://dashboard.stripe.com/test/customers/cus_XXXXXXX) and confirm the new iDeal/SEPA payment method in the list of the customers payment methods
  7. Navigate to My Account > Payment methods and delete the iDeal token (listed as SEPA IBAN)
    image
  8. Notice the payment method has not been removed from Stripe.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • WordPress Version
  • WooCommerce Version
  • Stripe Plugin Version
  • Browser [e.g. chrome, safari] and Version
  • Any other plugins installed

Additional context
Add any other context about the problem here.

@mattallan
Copy link
Contributor Author

Closed by #2902. Thanks Danae for picking this up so quickly! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants