# WooCommerce setup for PopMCP

You end up pasting your store's home URL plus a WooCommerce REST API Consumer key (ck_...) and Consumer secret (cs_...) generated in WooCommerce > Settings > Advanced > REST API.

- Auth: API credentials
- Setup time: 4 min
- API base URL: https://YOUR-STORE.com/wp-json/wc/v3
- Credentials screen: https://YOUR-STORE.com/wp-admin/admin.php?page=wc-settings&tab=advanced&section=keys (replace YOUR-STORE with your WooCommerce store)
- Provider docs: https://woocommerce.github.io/woocommerce-rest-api-docs/

## Before you begin

- A self-hosted WordPress site with the WooCommerce plugin active (WooCommerce 3.4 or later)
- A WordPress user with the Administrator role, because the Advanced settings tab is admin-only
- The store served over HTTPS, otherwise the REST API refuses Basic Auth credentials
- Pretty permalinks enabled (Settings > Permalinks set to anything other than Plain) so /wp-json/ resolves

## Get your credentials

### 1. Turn on pretty permalinks

Go to Settings > Permalinks, choose Post name, and click Save Changes. Then load `https://YOUR-STORE.com/wp-json/wc/v3` in a browser and check that JSON comes back rather than a 404 page.

Screen: https://YOUR-STORE.com/wp-admin/options-permalink.php (replace YOUR-STORE with your WooCommerce store)

### 2. Open the WooCommerce REST API key list

In the WordPress sidebar click WooCommerce > Settings, open the Advanced tab, then click the REST API section.

Screen: https://YOUR-STORE.com/wp-admin/admin.php?page=wc-settings&tab=advanced&section=keys (replace YOUR-STORE with your WooCommerce store)

### 3. Create a Read/Write key

Click Add key, type a Description, leave User on your administrator account, and set Permissions to Read/Write. Click Generate API key.

Screen: https://YOUR-STORE.com/wp-admin/admin.php?page=wc-settings&tab=advanced&section=keys&create-key=1 (replace YOUR-STORE with your WooCommerce store)

### 4. Copy the consumer key and consumer secret

Copy Consumer key and Consumer secret from the results screen before you navigate away. Click Copy beside each value.

### 5. Paste the three values into PopMCP

Set Store URL to your store's home URL with no trailing path, for example `https://YOUR-STORE.com`. Paste the Consumer key and Consumer secret, then save.

## Fields PopMCP asks for

- Store URL (siteUrl) [required]: Your store's home URL. The WooCommerce REST API lives under /wp-json/wc/v3.
- Consumer key (wcConsumerKey) [required]: WooCommerce → Settings → Advanced → REST API → Add key, with Read/Write permissions.
- Consumer secret (wcConsumerSecret) [required]: The secret shown once when you created the WooCommerce REST API key. Powers products, orders, and customers. Stored encrypted.

## Verify

PopMCP shows the WooCommerce connector as Connected and a test call lists your store's products. The key's row in WooCommerce > Settings > Advanced > REST API updates its Last access column to today.

## Troubleshooting

### 401 woocommerce_rest_cannot_view or "Consumer key is invalid"

Cause: The key was pasted with a trailing space, or the store is on plain HTTP so the Authorization header is stripped.

Fix: Re-copy both values and confirm the Store URL starts with https://. If your host strips Authorization headers, add the standard WordPress SetEnvIf or RewriteRule for HTTP_AUTHORIZATION to .htaccess.

### 404 rest_no_route on /wp-json/wc/v3

Cause: Permalinks are set to Plain, or WooCommerce is deactivated.

Fix: Set Settings > Permalinks to Post name, click Save Changes to flush rewrite rules, and confirm WooCommerce is active under Plugins.

### 403 woocommerce_rest_authentication_error on writes

Cause: The key was created with Read permissions, or the linked WordPress user is not an administrator.

Fix: Revoke the key and create a new one with Permissions set to Read/Write against an administrator account.

### There is no REST API section under Advanced

Cause: The store runs WooCommerce older than 3.4, where keys lived under WooCommerce > Settings > API > Keys/Apps.

Fix: Update WooCommerce, or create the key on the old API tab. The generated key works the same either way.

### Consumer secret was lost after closing the page

Cause: WooCommerce displays the secret only once, at generation time.

Fix: Click Revoke key on that row and generate a fresh key. There is no way to re-display an existing secret.

---

Source: https://www.docs.popmcp.com/docs/integrations/woocommerce/