Log in
Model

GetStockIdForCurrentWebsite

Magento\InventoryCatalog\Model\GetStockIdForCurrentWebsite

What it does

This service class determines which inventory stock is assigned to the current website context.

Developers use it when they need to retrieve the stock ID for inventory operations based on the active website, which is essential for multi-source inventory management where different websites can be assigned to different inventory stocks.

Public Methods

  • execute()