IsProductAssignedToStock
Magento\Inventory\Model\ResourceModel\IsProductAssignedToStock
What it does
This class checks if a specific product (identified by SKU) is assigned to a particular stock.
It queries the database to verify if there's a link between the product's source items and the given stock ID through the stock-source relationship.
Developers use this when they need to validate product-stock associations, such as before performing inventory operations or displaying stock availability.
Public Methods
- execute()