This error shows if you don’t enable inventory stock. First, you have to enable inventory stock from woocommerce settings.
1. Go to→
2. Click the Products tab, then the little link
3. Check Enable stock management.
After that, you have to set the stock of the products. You can set that from the products’ inventory.