WooCommerce: I Can't Add My Store
When you add a store to Metorik, you may run into an error where it says it can't find your site or similar. There are a number of different things that could be causing this issue which will we run through in this doc.
The requirements for Metorik to be able to connect to your WooCommerce store are:
- WooCommerce should be installed and active.
- The WordPress API should be enabled (it is by default).
- WooCommerce API should be enabled (it is by default).
When you first try to add your store to Metorik, enter the store's URL. If your store was https://records.shoppu.space/, you'd enter it as just records.shoppu.space.
If you have multiple stores in Metorik, you may want to choose the company the store goes under for billing purposes - more on this here.
You'll then be shown some details about the store. When ready, click the Connect button and we'll take you to your store to grant Metorik access (by logging into your site and confirming):
If after clicking 'Add Store' you see an error 404 page like this (or something similar):
Try one of the following solutions:
Solution 1 - Permalink Settings
In your WordPress admin, from the sidebar click Settings > Permalinks:
Then make sure the Post name option is checked:
If you already have post name selected, or after making this change you still see the 404 error when adding a store, try solution 2 below.
Solution 2 - Modify the authorization URL
After you click Add Store and see the 404 error page, inspect the link on the 404 page, if it looks like this:
With an %2F after /wc-auth. You need to remove the %2F and replace it with forward slash, /.
So it should look like this: https://yourdomain/wc-auth/v1/login/?app_name=Metorik&user_id
Click enter and it should then allow you to proceed without any errors.
Solution 3 - Manually enter in your consumer keys
After clicking add store and it failing, go back to Metorik's add store page and then click the Connect button above not working?
From here, you can manually create and enter in your consumer keys:
Click add a new key here to be redirected to your store create a key. Then paste them into the consumer key and consumer secret fields into Metorik's form and click Save Details.
WordPress plugins that can cause connection issues
Some plugins that we know cause issues here:
- Remove WordPress Overhead
- SecuPress
- Loginizer
- Sucuri
- Duo Security
Try and whitelist the following URLs in your security plugin:
- wc-api/*
- wp-json/*
By /*, we mean everything under those URLs, so wp-json/wc/v2 needs to be whitelisted. What you need to enter varies based on the security plugin you're using, but with Sucuri, it would be "Begins with wp-json".
If the security plugin you're using or your host needs an IP address that they can whitelist, please send us a message and we will do our best to accommodate you. But another option that may be better is to whitelist the user agent for Metorik's WooCommerce API requests, which contains Metorik (eg. Metorik API Client).
Also if you're running a security plugin, such as SecuPress, the WordPress API may be disabled by it. Check the security plugin's settings to be sure that the WordPress API is not disabled. Here's an example of what your SecuPress setting should look like: