StockStateProvider
Magento\CatalogInventory\Model\StockStateProvider
What it does
This class manages inventory stock state validation and calculations for products in Magento 2.
Developers use it to verify stock availability, check quantity constraints (min/max sale qty, qty increments), validate quote items against inventory rules, and determine if products can be backordered.
It's the core provider for all stock-related validations during cart and checkout operations.
Public Methods
- verifyStock()
- verifyNotification()
- checkQuoteItemQty()
- checkQty()
- suggestQty()
- checkQtyIncrements()
- getStockQty()