Getting the product stock status programatically in Magento 2 with and without MSI
In this article, I will show how to get the stock status of the product programmatically in Magento 2. I will also show how the new MSI feature in Magento 2.3 makes it a bit more complex to get the stock data and how to overcome this problem.