All WooCommerce sites have an API that allows other applications to access the data programatically. The Woo Importer app uses this API to copy your store's data from WooCommerce into Shopify.
In order for the Woo Importer app to connect to your WooCommerce store you'll need to enable the API on your WooCommerce site and generate a consumer key and secret (think of these as a username and password for the API). We'll cover how to do that in this article.
In order to enable the WooCommerce API to generate API credentials you'll need:
- A login to the admin section of your WooCommerce/Wordpress site
- Permalinks enabled on your Wordpress installation
Activating the API
These instructions apply to versions of WooCommerce released after July 15, 2015 (versions 2.4 and later). If you have an older installation of WooCommerce scroll down to the next section for instructions.
You can activate the API from your Wordpress site's admin. On the left-hand menu click on WooCommerce -> Settings:
Click on the tab that’s named API and make sure the Enable the REST API checkbox is checked. Click save changes:
Don't see the API tab?
Different versions of WooCommerce have slightly different ways to enable the API. If you're using version 3.4 or greater (released May 2018) check out the documentation here: https://docs.woocommerce.com/document/woocommerce-rest-api/#section-2
Otherwise, if you have an older version of WooCommerce, scroll down to the next section to see how to activate the API.
Now that the API is enabled, we need to generate credentials for the API. The WooCommerce API has two credentials for every API user: Consumer Key and Consumer Secret. You can think of these as a username and password for the program that will call your API.
Right below the tabs at the top of the page, click the link titled Keys/Apps. One the next page, click on the Add Key near the top of the page and enter a description for the API credentials. If the program that is using the API will need to change things on the WooCommerce site, change the permission dropdown to Read. Then click Generate API Key.
On the last page you’ll see your API credentials:
The Consumer Key will always start with ‘ck_’ and the consumer secret will always start with ‘cs_’. Copy these values and store them in a safe place, once you leave the page you won’t be able to see them again.
Activating the API - WooCommerce versions 2.3 and before
If you have an older version of WooCommerce there's a slightly different method to enable the API since API credentials are tied to a specific user.
The API can be activated on the main WooCommerce settings page. Go back to your WordPress site’s administration page and click on WooCommerce -> Settings:
On the settings page make sure the Enable the REST API checkbox is checked and click the Save Changes button at the bottom of the page.
On the main menu on the left of the WordPress admin section click on the Users tab:
Click on your username and you'll see a lot of settings you can change. If you scroll down to the bottom of the page there's a checkbox that says Generate API Key for WooCommerce:
Make sure that box is checked and reload the page.
Now, scroll down to the bottom of the page again. You should see your API credentials where the checkbox used to be:
The Consumer Key will always start with 'ck_' and the consumer secret will always start with 'cs_'.
That’s it! You now have your API credentials (the consumer key and consumer secret) and you can use them to import your products from WooCommerce to Shopify.
Don't have the app yet? Get it here