Introduction
Some merchants may have been using another Braintree plugin prior to switching to Braintree For WooCommerce. Should you wish to migrate user data from your existing plugin to Braintree For WooCommerce, you can perform the following step. It is recommended that you have your developer perform these steps for you.
Note: To execute the provided SQL statements, you can utilize phpMyAdmin, which provides a graphical interface to your Wordpress database.
Important - All text enclosed in brackets such as {usermeta_table}
should be replaced with your database's actual table name. We recommend you perform these statements in your development environment before executing in production to ensure you have entered the proper table names.
WooCommerce PayPal Powered by Braintree Payment Gateway
- Migrate Production Braintree Vault Users
CREATE TEMPORARY TABLE bfwc_temp SELECT * FROM {usermeta_table} as usermeta WHERE usermeta.meta_key = "_wc_paypal_braintree_customer_id"; UPDATE bfwc_temp SET meta_key = "braintree_production_vault_id"; INSERT INTO {usermeta_table} (user_id, meta_key, meta_value) SELECT user_id, meta_key, meta_value FROM bfwc_temp; DROP TEMPORARY TABLE IF EXISTS bfwc_temp; CREATE TEMPORARY TABLE bfwc_temp SELECT * FROM {usermeta_table} as usermeta WHERE usermeta.meta_key = "wc_braintree_customer_id"; UPDATE bfwc_temp SET meta_key = "braintree_production_vault_id"; INSERT INTO {usermeta_table} (user_id, meta_key, meta_value) SELECT user_id, meta_key, meta_value FROM bfwc_temp; DROP TEMPORARY TABLE IF EXISTS bfwc_temp;
- Migrate WooCommerce Subscriptions Payment Method
CREATE TEMPORARY TABLE bfwc_temp SELECT * FROM {postmeta_table} as postmeta WHERE postmeta.meta_key = "_wc_paypal_braintree_payment_method_token"; UPDATE bfwc_temp SET meta_key = "_payment_method_token"; INSERT INTO {postmeta_table} (post_id, meta_key, meta_value) SELECT post_id, meta_key, meta_value FROM bfwc_temp; DROP TEMPORARY TABLE IF EXISTS bfwc_temp; CREATE TEMPORARY TABLE bfwc_temp SELECT * FROM {postmeta_table} as postmeta WHERE postmeta.meta_key = "_wc_braintree_paypal_payment_token"; UPDATE bfwc_temp SET meta_key = "_payment_method_token"; INSERT INTO {postmeta_table} (post_id, meta_key, meta_value) SELECT post_id, meta_key, meta_value FROM bfwc_temp; DROP TEMPORARY TABLE IF EXISTS bfwc_temp; CREATE TEMPORARY TABLE bfwc_temp SELECT * FROM {postmeta_table} as postmeta WHERE postmeta.meta_key = "_wc_braintree_cc_token"; UPDATE bfwc_temp SET meta_key = "_payment_method_token"; INSERT INTO {postmeta_table} (post_id, meta_key, meta_value) SELECT post_id, meta_key, meta_value FROM bfwc_temp; DROP TEMPORARY TABLE IF EXISTS bfwc_temp; UPDATE {postmeta_table} AS postmeta SET postmeta.meta_value = "braintree_payment_gateway" WHERE postmeta.meta_value = "braintree_credit_card"; UPDATE {postmeta_table} AS postmeta SET postmeta.meta_value = "braintree_paypal_payments" WHERE postmeta.meta_value = "braintree_paypal";
Comments
0 comments
Please sign in to leave a comment.