Created
June 10, 2022 20:00
-
-
Save lukecav/f7a4e7e19858ed6ffa2f4f4697119a0a to your computer and use it in GitHub Desktop.
WooCommerce Stripe database cleanup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE FROM `wp_usermeta` | |
WHERE meta_key IN ( '_stripe_customer_id', '_stripe_source_id', '_stripe_card_id' ); | |
DELETE tokenmeta FROM `wp_woocommerce_payment_tokenmeta` tokenmeta | |
INNER JOIN `wp_woocommerce_payment_tokens` ON `wp_woocommerce_payment_tokens`.`token_id` = tokenmeta.`payment_token_id` | |
WHERE `wp_woocommerce_payment_tokens`.`gateway_id` = 'stripe'; | |
DELETE FROM `wp_woocommerce_payment_tokens` WHERE gateway_id='stripe'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://woocommerce.com/document/stripe-fixing-customer-errors/#section-1