woocommerce product set stock quantity code example
Example: get stock product woocommerce by id
$product_id = 1100;
$product = wc_get_product($product_id);
echo $product->get_stock_quantity();
$product_id = 1100;
$product = wc_get_product($product_id);
echo $product->get_stock_quantity();