Support » Plugin: WooCommerce Stripe Payment Gateway » update API keys and clean up

  • Resolved Tom Jansen

    (@azinity)


    Hi there,

    We’ve updated Stripe’s API keys but according to https://docs.woocommerce.com/document/stripe-fixing-customer-errors/, we need to clean up the database cleanup.

    Where shall we add the snippet? Thanks.

    DELETE FROMwp_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’;`

    BR,
    Tom

Viewing 1 replies (of 1 total)
  • Plugin Support Cara – a11n

    (@dcka)

    Hi Tom @azinity,

    The snippet you’re referring to is an SQL query. Your hosting provider may be able to run that query for you if need help with applying that to your site. Alternatively, you can reach out to one of the experts on our customizations page for assistance with the query.

    With all that said, working in the database is not necessarily an easy thing to do and can have serious complications if not done correctly.

    If you only have a small number of saved payment methods, you could remove them manually. Inside the user’s account page, there should be a tab where they can work with saved payment methods. You could delete them manually here.

    There is a handy plugin called User Switching that lets you log in as any user on the site. That will let you go and manually remove these from each customer. That might be another way to approach this without manually running a SQL query.

    As always, we recommend making a backup before making changes like this just in case there is any trouble.

    I hope that helps!

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.