Created
May 16, 2018 17:47
-
-
Save deshabhishek007/8aa78775de30340b77b3cbb6c9ae5df6 to your computer and use it in GitHub Desktop.
Get WooCommerce Product Inventory Status
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
$target_product_id = 13; | |
$product_in_cart = wc_get_product($target_product_id); | |
$stock_value = $product_in_cart->get_stock_quantity(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment