Model

GetLegacyStockItem

Magento\InventoryConfiguration\Model\GetLegacyStockItem

What it does

This class retrieves legacy CatalogInventory stock item data for a product using its SKU.

Developers use this when working with Magento's Multi-Source Inventory (MSI) but need to access or maintain compatibility with the older single-source stock system, such as during migration or when supporting backward compatibility with legacy inventory modules.

Public Methods

  • execute()
  • getLegacyStockItemBySku()