Log in
Model

DefaultStockProvider

Magento\InventoryCatalog\Model\DefaultStockProvider

What it does

This class provides the ID of Magento's default stock, which is always 1.

Developers use this when they need to reference the default stock in inventory operations, such as checking if a product is assigned to the default stock or filtering inventory queries.

It implements a standard interface to ensure consistent access to the default stock identifier throughout the system.

Public Methods

  • getId()