Redirect woocommerce single-product page

As per this post (https://stackoverflow.com/questions/43621049/woocommerce-multiple-single-product-templates-using-single-product-php-to-redire) I would update your code to look like this:

function so_43621049_template_include( $template ) {
  if ( is_singular('product') ) {
    $template = plugin_dir_path( __FILE__ ).'woocommerce/single-product.php';
  } 
  return $template;
}
add_filter( 'template_include', 'so_43621049_template_include', 20 );

I haven’t had a chance to test this but I believe it will work.

Leave a Comment