Would you like to check remaining in-stock quantity when working with orders? This snippet could help.
Last time I was answering my client’s email about whether it’s possible to show the remaining in-stock quantity of product. And, yes, it’s possible to do so. If you need to display in-stock quantity on the order detail page in your admin area, you can use the following snippet (all credit to Roman Pamula):
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters