Log in
Collection

AddIsInStockFilterToCollection

Magento\InventoryCatalog\Model\ResourceModel\AddIsInStockFilterToCollection

What it does

This class modifies product collection queries to filter products by stock status in Magento's Multi-Source Inventory (MSI) system.

Developers use this when they need to display only in-stock products from a specific stock/source in product collections, such as category pages or search results.

It adapts the standard stock filter to work with MSI's per-stock inventory tracking.

Public Methods

  • execute()