get product category by id woocommerce code example
Example 1: woocommerce get product id
global $product;
$product->get_id();
Example 2: is product category woocommerce
if( is_product_category() ) {
// yay, we are on a product category page!
} else {
}