Collection
AddStockDataToCollection
Magento\InventoryCatalog\Model\ResourceModel\AddStockDataToCollection
What it does
This class adds stock availability data to Magento product collections by joining inventory index tables.
Developers use it when they need to display or filter products based on stock status (in stock/out of stock) for a specific stock source, handling both default and custom inventory sources differently.
Public Methods
- execute()