MPH WMS
IntegrationsPlatforms

WooCommerce

Connect your WooCommerce store to MPH WMS

Connecting

There are two ways in, on the same page. Both end with the same connection.

  1. Log in to your WordPress admin as an administrator in the same browser.
  2. Go to Settings → Integrations → Add integration and choose WooCommerce.
  3. Enter your store address, for example https://shop.example.com, and click Connect.
  4. WooCommerce asks you to approve read/write access for MPH WMS. Approve it.
  5. WooCommerce creates an API key, sends it to MPH WMS directly, and returns you to the connection page.

The key is created on the WordPress user you are logged in as. Deleting that user, or revoking the key under WooCommerce → Settings → Advanced → REST API, disconnects the store.

Enter API keys manually

Use this when the redirect cannot reach MPH WMS (see Hosting gotchas).

  1. In WordPress, go to WooCommerce → Settings → Advanced → REST API and click Add key.
  2. Give it a description, pick an administrator user, set Permissions to Read/Write, and generate it.
  3. Copy the consumer key (ck_...) and consumer secret (cs_...). WooCommerce shows the secret only once.
  4. On the WooCommerce connect page in MPH WMS, open Enter API keys manually, paste both with the store address, and connect.

Either way, MPH WMS tests the keys against the store before saving anything. A key that does not work is refused with the store's own reason, rather than saved and failing on the first sync.

What syncs

Orders, inbound

Orders in Processing are imported. Orders that are Completed, Cancelled or Refunded are read as well, so an order that was already imported picks up its later state. Pending payment, On hold, Failed and draft orders are skipped. Change which statuses import under the connection's Settings tab, in Order statuses to import.

Taxes come across as percentages, prices are read as including or excluding tax the way the store is configured, and refunds made in WooCommerce arrive as refunds on the order.

The order import cutoff works exactly as it does for Shopify: orders created before you connected are never imported, unless you import one by number.

Products, inbound

Each simple product, and each variation of a variable product, becomes one MPH item matched on SKU. A product or variation without a SKU cannot be matched.

Inventory, outbound

Available stock is pushed to WooCommerce's stock quantity, so the storefront does not oversell. Only products and variations with Manage stock switched on are updated. A variation set to take its stock from the parent product updates the parent.

Fulfilments, outbound

When an order ships, MPH WMS reports the tracking back using the best option the store has:

  1. WooCommerce's own fulfilments, when they are switched on.
  2. The Shipment Tracking extension, when it is installed.
  3. Otherwise, a customer-visible order note with the carrier, tracking number and link.

When every line has shipped, the order is set to Completed, which also sends WooCommerce's order-completed email. Turn that off under the connection's Settings tab with Mark orders completed when shipped.

Locations

WooCommerce keeps one stock number per product, shown as Default stock. If the store runs the Multi Locations Inventory Management extension, its locations are listed too, and stock is pushed to the location you choose on the connection.

Not synced

Returns have no API in WooCommerce or its own return extensions, so they are not imported. Create returns in MPH WMS by hand; an order moved to a custom return status still arrives as an ordinary order update. Payouts are not available for WooCommerce.

Checkout rates and pickup points

MPH WMS can answer WooCommerce's checkout with shipping rates and pickup points, using the zones, methods and rates you configure on the connection's Shipping tab. The rules are the same as for Shopify: flat or weight-tiered pricing, free above a threshold, order limits and visibility rules.

WooCommerce has no API for a store to ask an outside service for rates, so this part needs a small plugin on the store.

Setting it up

  1. Download the plugin: mph-wms-for-woocommerce.zip.
  2. In WordPress, go to Plugins → Add New Plugin → Upload Plugin, choose the zip, install it and click Activate.
  3. Go to WooCommerce → Settings → Shipping. In each shipping zone that should get rates from MPH WMS, click Add shipping method and choose MPH WMS.
  4. Keep a Flat rate (or another method you trust) in the same zones as a backup. If MPH WMS cannot be reached, the checkout still has something to offer instead of no shipping at all.
  5. In MPH WMS, open the connection, go to the Shipping tab and click Register under Checkout rates. This hands the store the address and token it uses to ask for rates. The plugin shows the store as connected once it has them.

Repair sends the address and token again, for example after restoring the store from a backup or reinstalling the plugin. Deregister stops the store from asking; the checkout falls back to its other methods.

At checkout

Each method on the Shipping tab that matches the cart becomes one rate. A method with pickup points becomes one rate per pickup point, named after the method and the point (for example PostNord Ombud - ICA Maxi), so the customer picks a point by picking a rate. The number of points offered is set on the method. The chosen method and pickup point are saved on the order's shipping line, and MPH WMS imports them with the order, so the shipment is booked to that point without anyone retyping it.

Rates are calculated in the store's currency. MPH WMS sends each price as what the customer pays, VAT included. The plugin's Prices from the WMS include VAT option decides how WooCommerce treats it: switch it on and the plugin works out the price before VAT, so WooCommerce's own tax calculation lands on the same total instead of adding VAT on top.

A method can depend on whether the checkout address has a company name. WooCommerce sends the company to MPH WMS when the customer has typed one, and asks again when it changes, so a business-only method appears and disappears as the customer fills in the form. Run a test checkout with and without a company before relying on a company rule.

Troubleshooting

  • Register says the plugin is missing. MPH WMS could not find the plugin on the store. Check it is installed and activated, then click Register again. A firewall in front of the store that blocks /wp-json/ gives the same result; see Hosting gotchas.
  • The checkout shows only the backup rate. MPH WMS did not answer in time, or could not be reached. The plugin waits a few seconds and then lets WooCommerce carry on with the other methods. Check that the store can reach MPH WMS over HTTPS and that the connection is active.
  • No MPH WMS rates at all. Check that MPH WMS is added to the zone the address falls in, that the connection is registered on the Shipping tab, and that a zone and method on the Shipping tab match the address, cart value and weight. Visibility rules hide a method silently, by design.

PHP version

The plugin runs inside WordPress, so it runs on whatever PHP version your hosting provides. Two vulnerabilities in PHP itself, CVE-2026-109618 and CVE-2026-109619 (known as PHP2Shell), are fixed in these releases:

PHP branchFirst patched release
8.58.5.12
8.48.4.27
8.38.3.36
8.28.2.35

PHP 8.1 and older get no fix at all. Move to PHP 8.4.27 or newer. Some Linux distributions backport security fixes without changing the version number, so a distribution build can be patched while its version reads as older. Ask your host if you are unsure.

Check your version under Tools → Site Health → Info → Server. The plugin adds its own check to Tools → Site Health and reports an unpatched PHP there. MPH WMS also reads the store's PHP and plugin versions when you click Register or Repair, shows them under the buttons, and warns when the PHP is unpatched. If your version is older than the table, ask your host to upgrade PHP; it affects the whole site, not only this plugin.

MPH WMS itself runs on Node.js, not PHP, and is not affected. The rates address the plugin calls only accepts the store's token, and only reads: it calculates rates and changes nothing in MPH WMS.

Import rules and mapping

Import rules, field mapping and preview import work the same as for Shopify. See Shopify.

Webhooks and polling

On connecting, MPH WMS registers webhooks for new orders, updated orders and new products. You can see them under WooCommerce → Settings → Advanced → Webhooks. A scheduled sync also runs in the background, so a late or missed webhook does not mean a missed order. Product edits arrive through that scheduled sync rather than by webhook.

Hosting gotchas

WooCommerce runs on your hosting, not on a platform, so most connection problems are hosting problems.

  • The callback must be public HTTPS. In the recommended flow WooCommerce's server sends the keys to MPH WMS directly. WooCommerce refuses a callback that is not HTTPS, and the server must be able to reach it. A self-hosted MPH WMS needs WEBHOOK_BASE_URL set to a public HTTPS address.
  • Firewalls and Cloudflare block the delivery or the API. A web application firewall in front of MPH WMS can refuse the key delivery, which shows up as "keys never arrived". One in front of the store can answer API requests and webhooks from MPH WMS with 403. Allow the MPH WMS egress IP addresses, or the /wp-json/ path, in the firewall.
  • Plain permalinks work, with one extra request. The REST API normally lives under /wp-json/. With WordPress permalinks set to Plain that address does not exist, so MPH WMS falls back to the ?rest_route= form and remembers it. Nothing needs changing in WordPress.
  • Some hosts strip the Authorization header. MPH WMS detects this on its own: a request that fails with 401 is retried with the keys in the query string, and the store is remembered as needing that. Connecting works without any setting. Send API keys in the query string, under the connection's advanced settings, only forces this from the first request. A 401 that remains is wrong or revoked keys.
  • Webhooks run on WP-Cron. WooCommerce delivers webhooks through its scheduled actions, which only run when the site gets traffic or a real cron job triggers them. On a quiet site they can lag by minutes. The scheduled sync covers the gap; a server cron for WP-Cron removes it.
  • Webhooks switch themselves off. WooCommerce disables a webhook after repeated failed deliveries. Reconnecting the store re-enables them. Check the webhook status in WooCommerce if orders arrive only on the scheduled sync.

Logs and troubleshooting

The connection's Logs tab has separate sync and webhook views.

If sync is not working:

  1. Check the connection status on Settings → Integrations.
  2. Check the cutoff and the order statuses to import. An order older than the cutoff, or in a status that is not imported, never arrives.
  3. Check the webhooks are Active in WooCommerce.
  4. Read the Logs tab for the actual error. A 401 or 403 is almost always one of the hosting gotchas above.

On this page