Inventory

A bundle doesn't track its own inventory (inventoryTracked is always off). Instead, stock comes from its component variants, and is decremented against them.

Availability

Bundle::getIsAvailable() returns false if any component product has no purchasable, in-stock variant. A component with an untracked variant is always treated as available.

So a bundle goes unavailable automatically when a component sells out; no manual disabling needed.

Decrement on order completion

When an order completes, the bundle's afterOrderComplete() reads the line item's frozen snapshot and, for each chosen inventory-tracked variant, brings its available stock down by:

component quantity × line item quantity

…using Commerce's Inventory::updatePurchasableInventoryLevel(…, ADJUST), with a note recording the bundle SKU. Untracked variants are skipped.

Tip

Commerce calls afterOrderComplete() once per line item during the order's single completion transition, so stock only comes down once per bundle line.