svenddv
Forum Replies Created
Viewing 2 replies - 1 through 2 (of 2 total)
-
Forum: Plugins
In reply to: [WooCommerce] Removing product page contentHi @wpniall,
thanks for the suggestion but it doesn’t seem to work.
this is how I’ve tried it :
add_filter( 'template_include', 'demo_page_template'); function demo_page_template($template) { if ( is_page( is_product() ) ) { $template = $this->plugin_path . 'templates/woocommerce/single-product.php'; } return $template; }I’ve also tried it this way :
add_filter( 'template_include', 'demo_page_template'); function demo_page_template($template) { if ( is_product() ) { $template = untrailingslashit( plugin_dir_path( __FILE__ ) ) . 'templates/woocommerce/single-product.php'; } return $template; }still not seeing any effect.
Forum: Plugins
In reply to: [WooCommerce] Removing product page contentHi Ian,
Thanks for your reply! I really appreciate it.
I’m having trouble getting the template_include hook to work even without conditions, just trying to see if my code has any impact at all but it doesn’t do anything.
add_filter( 'template_include', 'demo_page_template'); function demo_page_template($template) { if ( is_page( 'single-product.php' ) ) { $template = $this->plugin_path . 'templates/woocommerce/single-product.php'; } return $template; }any ideas?
as always, thanks!
Viewing 2 replies - 1 through 2 (of 2 total)