Stock problems usually come down to one of three causes.
Stock is not actually being managed
Stock management has to be enabled globally in WooCommerce and per product. A product with management switched off will sell for ever regardless of the number shown. Check a product that oversold before assuming something more complex.
Held stock and abandoned checkouts
WooCommerce reserves stock for unpaid orders for a set period so that two customers cannot buy the last item at once. Set too high, the last few items appear unavailable for an hour after somebody abandoned a checkout. Set too low, you oversell during a busy period. The default suits most shops; adjust it if you sell single-quantity items.
External synchronisation
If stock comes from an accounts package, a supplier feed or a till system, the sync runs as a background job – and background jobs on a shop mean Action Scheduler. If that queue is stalled, stock silently stops updating while everything else looks fine. This is a very common cause of overselling and it is invisible until you look at the queue.
Practical protections
- Set low stock and out-of-stock thresholds and act on the notifications
- For genuinely one-off items, sell them as single-quantity so the reservation logic protects you
- Reconcile against your real stock periodically rather than trusting the sync indefinitely
When it does go wrong
Contact the customer quickly and honestly. Under UK consumer law you must refund promptly if you cannot supply, and doing that well often costs you less than the order was worth.