If a product category is then display code in product short description


How to display a specific code in a product short description if it is belong to a specific category, i’ve used below code in function to add the code but it is displaying on all products.

    function herara_filter_short_description( $  desc ){     global $  product; if ( is_single( $  product->id ) )         //$  new_desc = 'SKU: ' . $  product->get_sku();         $  new_desc = '<span class="sku_wrapper">SKU: <span class="sku">'. $  product->get_sku() .'</span></span></BR><span class="material_wrapper">MATERIAL: <span class="material">'. $  product->get_sku() .'</span></span>';         //$  new_desc .= $  desc;     return $  new_desc; } add_filter( 'woocommerce_short_description', 'herara_filter_short_description' );