WooCommerce Bill of Materials (BOM) & Component Stock Plugin
Softlimes developed a custom WordPress and WooCommerce plugin that links assembled parent products to their underlying child components (Bill of Materials), preventing overselling and deducting component stock automatically.

Standard WooCommerce inventory only tracks a single stock number per product or variation. That breaks down when a store sells assembled kits or manufactured products that share common underlying parts (nuts, brackets, circuit boards, or sub-assemblies).
If two different kits share the same bracket and a customer buys the last bracket inside Kit A, standard WooCommerce still shows Kit B as "In Stock", leading to backorders and cancelled sales.
We wrote a lightweight, custom PHP WooCommerce plugin that introduces true parent-child Bill of Materials (BOM) stock relationships directly inside the WordPress admin and checkout lifecycle.
Challenge:
Stopping oversold kits when shared components run out
The retailer’s warehouse team struggled with three inventory errors in default WooCommerce:
- Shared component blind spots: Multiple parent products relied on the same raw parts, so selling one kit silently invalidated the stock count of three other kits.
- Checkout overselling: Customers could add multiple kits to their cart that exceeded the total available child components on the warehouse shelf.
- Manual stock adjustments: Warehouse staff had to manually subtract component quantities in spreadsheets after every WooCommerce order.
They needed native WooCommerce hooks that calculated real buildable availability in real time without slowing down the store.
Our solution:
Pre-checkout BOM validation and atomic component deduction
We engineered the custom plugin using native WordPress and WooCommerce hooks:
- Parent-child BOM builder in WP Admin: Store managers attach any number of child SKUs and required quantities to a parent WooCommerce product.
- Cart & checkout stock gate: Before an item is added to cart or paid for, the plugin calculates total component demand across the entire cart and blocks incomplete builds.
- Automatic fulfilment depletion & restock: When an order is paid or fulfilled, child component stock is deducted automatically (and restored if an order is cancelled or refunded).

Before
- Oversold kits whenever shared child components ran low.
- Warehouse staff manually deducted raw part counts after every order.
- No cart-wide check when a buyer ordered two different kits sharing a part.
- Bloated third-party inventory plugins that slowed down wp-admin.
- Refunds and cancellations left component inventory counts out of sync.
After
- Real-time buildable stock calculated from live child component quantities.
- Automatic component stock deduction on order completion.
- Cart-wide validation that checks shared parts across all items in the basket.
- Lightweight custom PHP plugin with zero frontend script bloat.
- Automatic component restocking on order cancellation or refund.
Technologies used
Built with tools the client team can maintain and expand:
- Platform & Hooks: WordPress Core, WooCommerce Product & Order Lifecycle Hooks, PHP 8.x
- Data & Concurrency: Custom WooCommerce Meta Tables, Transactional Stock Deduction, WP-Admin UI
- Performance: Zero Frontend JS Footprint, Cached Availability Lookups
Client feedback:


Warehouse & E-Commerce Lead
Assembly & Retail Client
“This plugin solved our biggest warehouse headache. WooCommerce now knows the exact number of kits we can build from our raw parts and never lets a customer buy an incomplete kit.”
Outcome:
The retailer eliminated backorders caused by shared component shortages and saved hours of weekly warehouse stock reconciliation.