Custom single-product page for product from category x

Assuming that the taxonomy you want to check is product_cat and the term for which you want change template is special and finally assuming that the file you want to use for this special category is named special-single-product.php and resides in the root of your theme, the code you have to use is:

add_filter('template_include', 'special_single_product');

function special_single_product( $template ) {
  if ( is_singular('product') ) {
    if ( has_term( 'special', 'product_cat', get_queried_object() ) ) {
        return get_stylesheet_directory() . '/special-single-product.php';
    }
  }
  return $template;
}

tech