Answers for "woocommerce category page product id"

1

is product category woocommerce

if( is_product_category() ) {
	// yay, we are on a product category page!
} else {
 
}
Posted by: Guest on October-30-2020
0

get woocommerce product category link by id

global $post;
$link = '';
$terms = get_the_terms( $post->ID, 'product_cat' );
if(!empty($terms[0])){
    $link = get_term_link( $terms[0]->term_id, 'product_cat' );
}
Posted by: Guest on January-29-2022

Code answers related to "woocommerce category page product id"

Browse Popular Code Answers by Language