Custom Template Location
-
Hi,
unfortunately, i can’t use the template location in my theme, so i need to set up a custom template location.
I need this mostly for the emails.I tried to do this with the “woocommerce_gzd_template_path” filter but had no success with the code below.
Is there another way how to do this? For the moment i had to change the main woocommerce-germanized template files, so for now i cant update the plugin, which is not optimal.function filter_woocommerce_gzd_template_path( $woocommerce_germanized ) { $newtpl = str_replace( 'woocommerce-germanized/templates', basename( POXYB_DIR ) . '/woocommerce', $woocommerce_germanized ); if ( file_exists( $newtpl ) ) return $newtpl; return $woocommerce_germanized; } add_filter( 'woocommerce_gzd_template_path', 'filter_woocommerce_gzd_template_path', 10, 1 );
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Custom Template Location’ is closed to new replies.