Interface

StockRegistryInterface

Magento\CatalogInventory\Api\StockRegistryInterface

What it does

This interface defines the contract for managing product inventory stock data in Magento 2.

Developers use it to retrieve stock information, check product availability, get low stock items, and update stock quantities by product ID or SKU.

Note that this interface is deprecated since version 100.3.0 and replaced by Multi Source Inventory (MSI).

Public Methods

  • getStock()
  • getStockItem()
  • getStockItemBySku()
  • getStockStatus()
  • getStockStatusBySku()
  • getProductStockStatus()
  • getProductStockStatusBySku()
  • getLowStockItems()
  • updateStockItemBySku()