which template is used for product category in woocommerce code example
Example 1: is product category woocommerce
if( is_product_category() ) {
// yay, we are on a product category page!
} else {
}
Example 2: woocommerce create product specific template
add_filter('body_class','wpa76627_class_names');
function wpa76627_class_names( $classes ) {
if( is_singular( 'product' ) ):
global $post;
foreach( get_the_terms( $post->ID, 'product_cat' ) as $cat )
// maybe you want to make this more unique, like:
// $classes[] = 'product-category-' . $cat->slug;
$classes[] = $cat->slug;
endif;
return $classes;
}