Need some help with tweaking a code for woocommerce [closed]

try this

$term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); // current term
$parent_slug = ''; // default slug param

if( $term->parent ){   // if current term has parent then get it's slug
   $parent = get_term( $term->parent, get_query_var('taxonomy') ); // term's parent
   $parent_slug = $parent->slug; // slug of parent term
}

// check current term has product_cat taxonomy
$is_product_category = '' === $parent_slug ? 0: is_product_category($term->slug);

if ( is_product_category('furnitures') || ( $is_product_category  && 'furnitures' === $parent_slug) ) : ?>
<p>This is the text to describe category A</p>
<?php elseif (is_product_category('kitchen') || ( $is_product_category && 'kitchen' === $parent_slug) ) : ?>
<p>This is the text to describe category B</p>
<?php else : ?>
<p>This is some generic text to describe all other category pages, 
I could be left blank</p>
<?php endif; ?>