Поиск категории woocommerce

global $post;
$args = array( 'taxonomy' => 'product_cat',);
$terms = wp_get_post_terms($post->ID,'product_cat', $args);
$count = count($terms);
if ($count > 0) {
	foreach ($terms as $term) {
		if($term->term_id==395)
			echo '<span>"Цвет изображения на экране может отличаться от оригинала"</span>';
			// print_r($term->term_id);
	}
}
Ещё один вариант:
global $product;
$category_id = array(222);  // получаем категории товаров
$categories = get_the_terms( $product->id, 'product_cat' );  // проверяем принадлежность товара к вышеуказанным категориям по id
$product_in_category = false;
foreach ($categories as $item) {
   if (in_array((int)$item->term_id, $category_id)) {
       $product_in_category = true;
       break;
   }  
}
if($product_in_category){
	$pa_manufacturer = $product->get_attribute( 'pa_manufacturer' ); ?>
	<div itemprop="brand" itemscope itemtype="http://schema.org/Product">
		Брэнд:  <span itemprop="name"><?php echo $pa_manufacturer; ?></span>
	</div>
}
Ищем категорию с ID 395 и выводим нужную информацию