The following code is to override the Product Details page template, It was working since the last update on WooCommerce. Can anyone help me out on this, thanks in advance.
add_filter('template_include', 'wpautomate_plugin_templates');
function wpautomate_plugin_templates( $template )
{
$plugin_path='';
$reflector = new ReflectionClass('Ze_Single_Product_Layout');
$file_name=plugin_dir_path($reflector->getFileName());
$plugin_path=$file_name;
$post_types = array('product');
$template_id=get_post_meta( get_the_ID(), '_product_layout', true );
if (is_singular('product') && !empty($template_id))
{
//render custom template for single product
$template = $plugin_path . 'template/woo-single-page.php';
}
return $template;
}//end of function