is_product_category() WC 1.0
Is_product_category - Returns true when viewing a product category.
Хуков нет.
Возвращает
true/false.
Использование
is_product_category( $term );
- $term(строка)
- (default: '') The term slug your checking for. Leave blank to return true on any.
Код is_product_category() is product category WC 5.0.0
function is_product_category( $term = '' ) {
return is_tax( 'product_cat', $term );
}