how to get product detail by product slug in woocommerce custom loop code example Example: get product id inside the loop woocommerce global $product; $id = $product->get_id();