WooCommerce Inventory Integration: Sync Orders and Stock Automatically

July 12, 2026
8 min read
By Nstock Team
WooCommerce Inventory Integration: Sync Orders and Stock Automatically
SC

Sarah Chen

Manufacturing Operations Consultant | 8 Years

Sarah specializes in production workflow optimization and inventory systems for electronics and contract manufacturers. She has helped 30+ manufacturing teams transition off spreadsheets and into modern inventory systems.

WooCommerce tells you how many units you've sold. It doesn't tell you which raw material lot went into which order, whether you're about to run out of a component mid-production, or what your actual cost of goods sold is on a given batch. For a store owner who's also doing light manufacturing or assembly — mixing, filling, packaging, kitting — that gap is where stockouts and inaccurate margins come from. Nstock's WooCommerce integration closes it.

What the Integration Does

Once connected, the integration handles four things automatically:

  • Order sync. Every order created or updated in WooCommerce creates or updates a matching order in Nstock, in real time, without anyone re-entering line items by hand.
  • Automatic inventory deduction on fulfillment. When an order is marked fulfilled in WooCommerce, Nstock deducts the finished products — and any boxes or packaging tracked as inventory — using FEFO (first-expired, first-out) lot selection. This is the same deduction logic Nstock runs for every order regardless of where it came from; WooCommerce orders don't get special-cased or simplified treatment.
  • Refund restocking. When a WooCommerce order is refunded, the corresponding items are added back into Nstock inventory automatically, instead of someone remembering to manually adjust stock after the fact.
  • Historical order import. If you're connecting an existing store, you can pull in past orders over a chosen date range. Nstock skips anything that already exists, so re-running an import doesn't create duplicates.

Why This Matters for a WooCommerce Manufacturer

WooCommerce's built-in stock counter is a single number per product or variant. It goes down when an order is placed and up when you manually edit it. That's fine for a store that just resells finished goods it buys in. It falls apart the moment you're actually making the product.

If you're mixing a batch of lotion, assembling a circuit board, or filling supplement capsules, your real inventory constraint isn't "units of finished product" — it's the raw materials and components that go into them, tracked lot by lot, with expiry dates that matter for compliance and quality. WooCommerce has no concept of any of that. Without a real inventory system behind it, most stores end up in one of two states: overselling because WooCommerce's stock count didn't reflect a stalled production run, or manually re-entering every order into a separate system just to keep raw material counts honest.

The integration removes both problems. Order data flows in automatically, inventory deducts against the same lot-tracked system you use for every other channel, and your WooCommerce storefront's fulfillment status drives real deductions instead of a number someone has to remember to update.

How It's Different From the Shopify Integration

If you've read Nstock's Shopify integration guide, the WooCommerce version works differently in one important way: there's no OAuth.

Shopify's integration uses OAuth — you click Connect, get redirected to Shopify's authorization screen, and grant access through Shopify's own flow. WooCommerce doesn't have an equivalent app-marketplace authorization system for self-hosted stores, so the integration uses WooCommerce's REST API instead. You generate a Consumer Key and Consumer Secret yourself, inside your WordPress admin, and paste them into Nstock.

For a lot of self-hosted store owners, this is actually simpler, not harder. There's no redirect, no third-party app approval screen, and no dependency on a hosted app-store review process — you control the credential directly from settings you already have access to. The full steps are in How to Connect WooCommerce to Nstock.

How It Works

The mechanics, end to end:

  1. An order is created or updated in WooCommerce.
  2. WooCommerce sends Nstock a webhook notification for that order.
  3. Nstock creates or updates the matching order record.
  4. When the order is fulfilled, Nstock deducts finished goods (and boxes, where tracked) from inventory using FEFO lot selection — pulling from the earliest-expiring lot first, exactly as it does for orders placed through any other channel.
  5. If the order is later refunded, Nstock adds the deducted quantities back to inventory automatically.

Nothing about this path is WooCommerce-specific under the hood. WooCommerce orders run through the exact same fulfillment and restocking logic as manually entered orders, Shopify orders, or any other order source in Nstock — there's no separate, lighter-weight code path for one sales channel versus another.

Who This Is For

This integration is built for WooCommerce store owners doing their own light manufacturing or assembly — not pure resellers. Typical fits:

  • Food and beverage — small-batch sauces, baked goods, or beverages where you need lot traceability from raw ingredient to finished product, not just a unit count.
  • Cosmetics and personal care — formulated products where batch consistency and ingredient lot tracking matter, and where FEFO deduction keeps you from selling out of an older, closer-to-expiry batch while a newer one sits untouched.
  • Supplements — capsule filling, blending, and packaging operations that need the same lot discipline as food, often for the same regulatory reasons.
  • Electronics and kitted goods — assembly of finished units from purchased components, where a bill of materials needs to drive component depletion, not just a finished-goods count.

If you're reselling products you buy pre-made and never touch a bill of materials, WooCommerce's native stock tracking may be enough on its own. The integration earns its keep once you're actually manufacturing or assembling what you sell.

Frequently Asked Questions

Do I need to know how to code?

No. Generating the REST API key happens entirely inside the WordPress admin UI, and connecting it to Nstock is a form with three fields. There's no custom code, plugin development, or server configuration involved on either side.

Is this secure?

Yes. Your WooCommerce Consumer Key and Consumer Secret are stored server-side and are never exposed to your team's browsers — the Nstock UI only ever shows connection status, never the credentials themselves.

What if I also sell on Shopify?

Nstock supports both integrations simultaneously on the same account. Orders from WooCommerce and Shopify both flow into the same inventory system, deducting against the same lots, so you get one accurate picture of stock regardless of which storefront a given sale came from.

Does this replace WooCommerce's own inventory settings?

Not exactly — WooCommerce's stock counter still exists and can still display availability to shoppers. What changes is where the source of truth lives: instead of manually maintaining WooCommerce's number, Nstock's fulfillment and refund logic drives real inventory changes for you.

What if I only want order data, not automatic deduction?

That's supported. The order-creation toggle and the inventory-deduction toggle are independent — you can sync orders into Nstock for visibility and reporting without turning on automatic fulfillment deduction, and enable it later once you're confident in your setup.

Get Started

Setup takes about fifteen minutes end to end. For the exact steps — generating the REST API key in WordPress and connecting it to Nstock — see How to Connect WooCommerce to Nstock.

Start your free trial → — already have an account? Log in and connect WooCommerce from Integrations.

— Sarah Chen, Manufacturing Operations Consultant

Get Manufacturing Insights in Your Inbox

Practical guides on inventory management, production efficiency, and AI-powered manufacturing — delivered to you.

Subscribe to the Newsletter