woocommerce_gzd_default_plugin_template

The WooCommerce Germanized woocommerce gzd default plugin template hook.

Description

apply_filters( 'woocommerce_gzd_default_plugin_template', (string) $this_plugin_path_templates_template_name, (string) $template_name ); 

Parameters (2)

0. $this_plugin_path_templates_template_name (string)
The this plugin path templates template name.
1. $template_name (string)
The template name.

Usage

To run the hook, copy the example below.
  1. $this_plugin_path_templates_template_name = apply_filters( 'woocommerce_gzd_default_plugin_template', $this_plugin_path_templates_template_name, $template_name ); 
  2.  
  3. if ( !empty( $this_plugin_path_templates_template_name ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the woocommerce_gzd_default_plugin_template callback 
  2. function filter_woocommerce_gzd_default_plugin_template( $this_plugin_path_templates_template_name, $template_name ) { 
  3. // make filter magic happen here... 
  4. return $this_plugin_path_templates_template_name
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'woocommerce_gzd_default_plugin_template', 'filter_woocommerce_gzd_default_plugin_template', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'woocommerce_gzd_default_plugin_template', 'filter_woocommerce_gzd_default_plugin_template', 10, 2 ); 

Defined (2)

The filter is defined in the following location(s).

/woocommerce-germanized.php  
  1. if ( ! $theme_template && file_exists( apply_filters( 'woocommerce_gzd_default_plugin_template', $this->plugin_path() . '/templates/' . $template_name, $template_name ) ) ) 
  1. $template = apply_filters( 'woocommerce_gzd_default_plugin_template', $this->plugin_path() . '/templates/' . $template_name, $template_name );