[WooCommerce] Validating Customer and Product Id's

If you are planning to migrate to a new site, migrating existing subscriptions, or are changing your site environment, it is important to prioritize your site's data before anything else. This is because Customers and Products are referenced by their Id's in your WordPress Database. Autoship Cloud's hosted service QPilot uses these Ids to synchronize your product and customers, so if the data associated with the Ids have changed, your data in QPilot could become corrupted. 

To avoid unexpected changes to your site's data, export your customers and products from the old site and import them to the new site as a first step. 

WooCommerce has a basic Export / Import tool for products, but there are many paid and free plugins that offer more features. Some examples of these plugins are:

After importing products and customers to the new site, it is always a good idea to compare your original site's export with and export from your new site (after importing them) by seeing which ids match / do not match between exports.

Learn more below!

How to Verify Customer & Product Id's 

Verifying that your Customer and Product Id's match between two sites is an extremely important step to ensure a successful migration. 

There are many ways to do this, but the easiest method is to have your hosting provider or developer clone your existing site's database to your new site before you begin to design, customize, and test. By ensuring no new data is created on your new site, you prevent existing Ids assigned to a customer or product on your old site from being applied to another on your new site.

Export and Verify Customers and Products 

If you are unsure if your Id's changed when creating your new, you can check this by exporting your products and customers from both sites and comparing the exports in a spreadsheet editor. 

Exporting Customers

In the example below, an admin uses a plugin to export their customers to compare between sites.

Notice they only are using the ID and user_email since they only need to compare the (user) IDs between their sites by matching the user_email.

Exporting Products 

Products can similarly be exported from WooCommerce. Go to WP-Admin > Products and select the "Export" option, and you will be able to export a CSV of your products to review and compare them. See how the user exports only the fields they need in the images below? In this case, you only need to compare Product Id's and Titles.