get product type by product id woocommerce code example
Example 1: woocommerce get product id
global $product;
$product->get_id();
Example 2: get stock product woocommerce by id
$product_id = 1100;
$product = wc_get_product($product_id);
echo $product->get_stock_quantity();