• 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)
  • Plugin Author vendidero

    (@vendidero)

    Hi there,

    which template exactly are you trying to edit? This path is a sub-path within your current theme – there is no way to adjust it to an absolute dir. You could use the woocommerce_germanized_filter_template to change the whole dir instead.

    Cheers

    Thread Starter John Halflord

    (@honsi)

    Thanks, this works. Somehow, i have missed this hook.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom Template Location’ is closed to new replies.