Helper
Stock
Magento\CatalogInventory\Helper\Stock
What it does
This helper class manages stock status operations for products and product collections in Magento 2.
Developers use it to assign stock availability information to products, filter collections to show only in-stock items, and determine product salability.
Note that this class is deprecated in favor of the Multi Source Inventory (MSI) system introduced in Magento 2.3.
Public Methods
- assignStatusToProduct()
- addStockStatusToProducts()
- addInStockFilterToCollection()
- addIsInStockFilterToCollection()