When a customer goes to a payment provider to pay, KahunaCart reserves the stock in their cart with a stock hold, so nobody else can buy the same units while they pay. While holds cover your remaining stock, other customers see "Out of stock" or "not enough left".
Holds last 15 minutes by default and are released by the background worker.
Fix it
- Wait for the hold window to pass. Holds expire after Stock Hold Window (minutes), on the Commerce tab of KahunaCart → Settings (
stock.hold_minutes, default15). - If the stock stays locked longer than that, the worker is not running, so expired holds are never released. Check with
bin/plugin kahunacart statusand see How do I set up Grav's scheduler? - To turn holds off entirely, set the hold window to
0.
An order failed with an insufficient-stock error
Two customers went for the last unit and one lost. The losing order rolled back to a cart in full, with no order number and no stock taken. The customer can try again once there is stock.
Stock went negative
The variant allows backorders. Set its Backorders to Not allowed if stock should stop at zero.