This article is useful when your system has an inventory module enabled and uses multiple sources and stock functionality for a given website.
To Retrieve the Stock name by Website code, You need to use the interface Magento\InventorySalesApi\Api\StockResolverInterface.
Given Interface is responsible for getting the linked stock-related information for a certain sales channel. Continue reading “How to get stock name by website code in Magento 2?”