Home / Integrations / Channels / WooCommerce

Connect WooCommerce to Foundry

Sync orders, inventory, prices, and listings between your WooCommerce store and Foundry IMS. Generate one API key pair in WooCommerce, paste three values into Foundry — total time about 5 minutes.

What you'll get

  • • New WooCommerce orders appear in Foundry within seconds (via native Woo webhooks)
  • • Inventory and price updates in Foundry push to Woo automatically
  • • Listings created in Foundry publish to Woo, including variable products
  • • Shipment tracking writes back to the order and marks it complete
  • • Existing Woo products can be pulled in and matched to your Foundry catalog
1

Prerequisites

Three things to have ready before you start:

WooCommerce 3.5+ with the REST API reachable

Foundry talks to /wp-json/wc/v3/. Open https://yourstore.com/wp-json/wc/v3/ in a browser — a JSON response (even an auth error) means the API is live. A 404 usually means permalinks are set to "Plain"; switch them to any other option under Settings → Permalinks and retry.

HTTPS with a valid certificate

Foundry authenticates with HTTP Basic, which sends the key pair on every request. We require a valid TLS certificate — plain HTTP and self-signed certs are refused. This is also a WooCommerce requirement for Basic auth.

An administrator account on the WordPress site

REST keys inherit the permissions of the user who creates them, and Foundry validates the connection against an admin-only endpoint. Generate the key as an administrator, not as a shop manager.

2

WooCommerce side: generate an API key

WooCommerce has REST keys built in — there's no plugin to install and nothing to submit for review.

Open the REST API settings

In WordPress admin, go to WooCommerce → Settings → Advanced → REST API, then click Add key.

Create the key with Read/Write access

Fill in the form:

  • Description — "Foundry IMS" (or anything recognizable in an audit later)
  • User — an administrator account
  • PermissionsRead/Write. Read-only will fail validation; Foundry needs write access to push inventory, prices, and tracking.

Click Generate API key.

Copy both values now

WooCommerce shows the Consumer key (ck_…) and Consumer secret (cs_…) exactly once. If you navigate away before copying them, the key can't be recovered — revoke it and generate a new one.

3

Foundry side: create the channel

Add a sales channel

In Foundry, go to Sales Channels → New Channel and pick WooCommerce as the platform.

Paste the credentials

  • Store URL — your site root, e.g. https://yourstore.com. No trailing slash, and no /wp-json path — Foundry appends that itself.
  • Consumer key — the ck_… value
  • Consumer secret — the cs_… value

Save — Foundry validates immediately

On save, Foundry calls WooCommerce's admin-only system-status endpoint. It succeeds only if the key exists, has Read/Write scope, and belongs to an admin — so a green result means the connection genuinely works, not just that the URL resolved.

Register webhooks

Foundry registers its own webhooks in WooCommerce with a generated secret. Woo signs each delivery with HMAC-SHA256 in the X-WC-Webhook-Signature header and Foundry verifies it before accepting the payload. You'll see the registered hooks in WooCommerce → Settings → Advanced → Webhooks, each named "Foundry IMS — …".

4

What syncs

Data Direction Trigger
Orders Woo → Foundry Webhook, near-instant
Inventory Foundry → Woo On stock change, batched
Prices Foundry → Woo On price change, batched
Listings Foundry → Woo On publish / update
Product images Foundry → Woo On listing sync
Tracking Foundry → Woo On shipment
Existing catalog Woo → Foundry Manual pull

Variable products

Woo's "variable product" is what Foundry calls a family. Publishing one is a two-step write — Foundry creates the parent with its attributes, then adds each variation underneath. A pull works the same way in reverse: every variation arrives as its own row, ready to match to a Foundry variant.

Order status mapping

pending, on-hold, processing, cancelled, and refunded map to their Foundry equivalents. Custom statuses added by plugins fall through to processing, so they import as live orders rather than being silently dropped.

Inventory is a per-product flag

Woo has no separate inventory module — stock lives on the product (or variation) and only applies when Manage stock is enabled. Foundry sets that flag when it publishes a listing. For products created directly in Woo, turn it on yourself or quantity pushes will be ignored.

5

Limits worth knowing

Things this connector deliberately doesn't do, so you're not surprised later:

Tracking needs a plugin to be visible to customers

Core WooCommerce has no tracking API. Foundry marks the order completed and writes the number, carrier, and URL to the _tracking_number, _tracking_provider, and _tracking_url meta keys that the common tracking plugins read — Advanced Shipment Tracking is the usual one. Without such a plugin the data is stored on the order but won't render in customer emails or the account page.

No fulfillment IDs

Woo doesn't model fulfillments as separate objects, so a shipment links back to the order rather than to a Woo fulfillment record. Partial shipments are tracked fully on the Foundry side.

One store per channel

Each WooCommerce channel points at a single store URL. Multi-site WordPress networks need one Foundry channel per store.

6

Troubleshooting

"Invalid credentials" on save, but the key looks right

Most often the key is Read-only rather than Read/Write, or it belongs to a shop-manager account instead of an administrator. Both fail the admin-only validation call. Regenerate as an administrator with Read/Write. Also confirm the store URL has no trailing slash and no /wp-json suffix.

401 Unauthorized even with a valid key

Some hosts and security plugins strip the HTTP Authorization header before it reaches WordPress. If your host runs PHP over CGI/FastCGI this is common. Ask your host to pass the header through, or add the standard HTTP_AUTHORIZATION rewrite rule to your .htaccess.

Orders aren't arriving

Check WooCommerce → Settings → Advanced → Webhooks for hooks named "Foundry IMS — …". If they're missing, re-save the channel in Foundry to re-register them. If they're present but paused, Woo disabled them after repeated delivery failures — usually a firewall or a site that was down. Set them back to Active. Note that WooCommerce only fires webhooks on real order transitions; orders created by an importer sometimes bypass them.

Inventory pushes but the storefront still shows the old number

Confirm Manage stock is enabled on the product — without it Woo ignores the quantity entirely. If it's on, the value is almost certainly cached: full-page caches and object caches on managed WordPress hosts commonly serve stale product data. Purge the cache and re-check.

Large catalogs time out on pull

Foundry pages through the catalog, but variable products cost one extra request per parent to fetch variations. On shared hosting with thousands of variable products, the site itself may rate-limit or time out. Pull during off-peak hours, and consider raising PHP's max_execution_time.

Stuck? Email support with your store URL and we'll trace it on our side.