I've created a specific product template for a few of my WooCommerce products. However not all of the plugins and WooCommerce JS files load on this page. I assume it's leaving out some default headers a WooCommerce product page would otherwise have.
function custom_single_product_template_include( $template ) {
if ( is_singular('product') && (has_term( 'book-a-room', 'product_cat')) ) {
$template = get_stylesheet_directory() . '/template-book-a-room.php';
}
return $template;
}
add_filter( 'template_include', 'custom_single_product_template_include', 50, 1 );
Is there any way I can assign this page as a WooCommerce page so all the default files load?