WooCommerce
Fixing "You cannot add that amount to the cart" in WooCommerce
Two different stock checks produce the message: one for the quantity being added, one for that quantity plus what the cart already holds. Variations sharing the parent's stock and stock reserved by unpaid orders explain most of the surprising cases.