DEV3 AI Shared Stock & Inventory for WooCommerce

WooCommerce plugin: stock pools that many products, variations and attribute values draw from, kept correct through orders, refunds, cancellations and edits, with statistical forecasts and optional AI explanations.

by DEV3 TechnologiesVerified Author(0) 0 downloads 0 viewsUpdated 29 Oct 2026
1 / 8

WooCommerce plugin: stock pools that many products, variations and attribute values draw from, kept correct through orders, refunds, cancellations and edits, with statistical forecasts and optional AI explanations. Free download: sign in and click Download ZIP. Add your own Google AI Studio (Gemini) API key to switch on the AI features; the documentation says which features work without one.

How it works

We built DEV3 AI Shared Stock & Inventory as a WooCommerce plugin in PHP with a React admin. A stock pool holds the real units; products, variations and attribute values link to it with a number of units per sale.

Key design decisions

  • Each order line remembers what it took. On first deduction a line stores its pool map (pool → units per item); later syncs use that map, not today's links, so a cancellation returns exactly what was taken.
  • Target-based, idempotent sync. Every hook computes the line's target ((quantity − restocked) × units, or 0 when the order doesn't hold stock) and moves each pool by the difference from what is already deducted. Repeated or out-of-order WooCommerce hooks can't double-count.
  • Atomic pool updates. Pool stock changes with a single UPDATE … SET stock = stock + delta, never read-modify-write in PHP, and every change is written to a history log with its order, item and reason.
  • Link resolution with precedence. Every matching link applies, so a party box linked to cans and cups is a kit. When several links point at the same pool, a variation link beats a product link, which beats an attribute rule.
  • A whole-cart check. WooCommerce checks stock per product, so a 6-pack and singles could each pass while together they need more cans than exist. A cart guard sums demand per pool across the classic cart, the block cart and the Store API checkout.
  • Product stock mirrored. Each linked product's own WooCommerce stock is set to pool stock ÷ units per sale (the lowest across its pools), so stock text, the quantity box, feeds and the REST API all show the shared number.

Architecture

Pools, links, purchase orders, alerts and the stock log live in custom tables. Forecasts are statistics first (a blended daily rate, trend, weekday pattern and a 95% safety buffer), giving days left and a reorder quantity and date. With the Google Gemini API connected, DEV3 AI explains forecasts in plain words, drafts purchase-order emails, proposes pools from the catalogue, explains anomalies such as an extra zero typed by hand, and answers questions about the inventory. Every AI result is a draft, and every feature has a non-AI fallback. Product Bundles, Composite Products and Mix and Match lines can deduct as the container, the children or both. The API client, encrypted key storage and usage logs come from a shared core used across DEV3's plugins.

What's in the download

  • The installable plugin zip: upload it through Plugins → Add New → Upload Plugin.
  • Full HTML documentation (installation, settings, hooks, FAQ).

Requirements

  • WordPress 6.0 or newer and PHP 7.4 or newer
  • WooCommerce 8.0 or newer, active, with WooCommerce → Settings → Products → Inventory → Enable stock management turned on (legacy order storage and HPOS are both supported, as are the cart and checkout blocks)
  • Optional: Product Bundles, Composite Products or Mix and Match, if you sell bundles
  • Optional: a Google Gemini API key for the DEV3 AI explanations and drafts. Pools, deduction, alerts, statistical forecasts and template purchase orders work without one

Learn more

Frequently asked questions

The complete source code (version 1.0.0) as a download from your account, with the setup and usage guides shown on this page. It is free: sign in to download it.

More from this author

View all

Related in CMS Extensions

View all