# WooCommerce stock is out of sync

> "Out of sync" almost always means two systems each believe they own the truth about stock, with nothing arbitrating between them. WooCommerce manages stock per product, or per variation, through the "Manage stock?" option; the problem starts as soon as an external source, a supplier, an ERP or another sales channel, changes that figure without going through the same rules.

- Source canonique : [https://allaux.fr/en/wordpress-woocommerce/problemes/stock-desynchronise](https://allaux.fr/en/wordpress-woocommerce/problemes/stock-desynchronise)
- Langue : EN
- Dernière mise à jour : 2026-09-30

## Direct answer

> Compare the product’s _stock value in the database with the external system’s figure taken at the same moment: the gap names the culprit, not what the product page displays. Then check WooCommerce > Settings > Products > Inventory, in particular the hold stock delay, which reserves items for unpaid orders and makes stock look lower than it is.

## How I go about it

1. **Checking the source of truth** — I look at where the displayed figure actually comes from: the _stock value in the WooCommerce database, or data re-imported from a supplier feed, an ERP, or another sales channel, and how often.
2. **Analysing the sync frequency** — A nightly CSV import or a sync over the wc/v3/products REST API that doesn’t run often enough leaves a window where two simultaneous sales, on two different channels, can oversell the same item.
3. **Checking the hold delay** — The woocommerce_hold_stock_minutes setting reserves stock for an unpaid order for a set number of minutes. A payment gateway slow to confirm can make this normal reservation look like a desync.
4. **Looking for orders created outside the normal flow** — An order inserted directly through the API or an import, outside WooCommerce’s usual checkout flow, can bypass the normal stock-decrement hook and leave a wrong figure with no visible order to explain it.
5. **Deciding on the target sync mechanism** — Once the cause is identified, I work out whether a setting is enough or whether the real fix is a small dedicated sync service, with a clear arbitration logic between the systems involved.

## What I handle regularly

- A product sold on WooCommerce when the supplier was already out of stock
- The stock shown doesn’t match either the ERP or the supplier, with no obvious pattern
- Orders hold stock for several minutes without completing, throwing off the available figures
- A stock import overwrites quantities that had just been sold minutes earlier
- Stock is correct right after the import, then drifts through the day

## Where the gap actually comes from

WooCommerce stores the quantity (_stock) and a computed status (_stock_status) as product or variation metadata. As long as a single source changes that figure, through the normal checkout flow, everything stays consistent. The problem starts as soon as a second system, a supplier feed, an ERP or another sales channel, also writes that value, with neither one aware of what the other just did.

A nightly CSV import or a sync over WooCommerce’s REST API (the wc/v3/products endpoint) that only runs once or twice a day creates a window where the catalogue can be oversold between two passes, particularly on a fast-moving catalogue.

The woocommerce_hold_stock_minutes setting adds a nuance that’s often overlooked: an unpaid order reserves stock for a fixed period. If the payment gateway is slow to confirm, that normal reservation can be misread as a desync.

## A structural fix, not just a setting

> Adjusting the hold delay or a scheduled import’s frequency stays a setting. But as soon as two systems need to stay continuously aligned, the durable fix is almost always a small sync service with explicit arbitration logic, not another checkbox.

## Worth reading too

- **API integrations** — Connecting WooCommerce to an ERP, a supplier or another sales channel with proper sync logic. ([/services/integrations-api](/services/integrations-api))
- **Custom WooCommerce extension** — When the sync logic goes beyond what an off-the-shelf plugin can arbitrate between two sources. ([/wordpress-woocommerce/extension-sur-mesure](/wordpress-woocommerce/extension-sur-mesure))

## FAQ

### Is a simple sync plugin enough to fix this?

Sometimes, if both systems have a compatible API and a sync frequency good enough for your sales volume. On a fast-moving catalogue or with several channels, a generic plugin hits its limits quickly.

### Why does stock drift even with no sales on WooCommerce?

Because the gap can come entirely from the external system’s side: an import overwriting a value, or a sync running at a different pace than expected.

### Can the stock hold delay be disabled?

Yes, but I generally advise against it: it stops a customer stuck at payment from tying up stock other buyers could otherwise purchase during their attempt.

### How long does setting up a reliable sync take?

It mostly depends on the quality of the API or feed available on the external system’s side. An ERP with documented API access moves much faster than a plain file export to be parsed.
