Interface

StockStateProviderInterface

Magento\CatalogInventory\Model\Spi\StockStateProviderInterface

What it does

This interface defines methods for checking and validating product stock availability and quantities in Magento 2.

Developers implement this interface to verify if products are in stock, validate customer order quantities against inventory rules (min/max quantities, increments), and suggest appropriate quantities when requested amounts don't meet stock requirements.

Note: This interface is deprecated and replaced by Multi Source Inventory (MSI) in newer Magento versions.

Public Methods

  • verifyStock()
  • verifyNotification()
  • checkQuoteItemQty()
  • checkQty()
  • suggestQty()
  • checkQtyIncrements()
  • getStockQty()