woocommerce_locate_core_template

The WooCommerce woocommerce locate core template hook.

Description

apply_filters( 'woocommerce_locate_core_template', (unknown) $core_file, (unknown) $template, (unknown) $this_template_base, (unknown) $this_id ); 

Parameters (4)

0. $core_file (unknown)
The core file.
1. $template (unknown)
The template.
2. $this_template_base (unknown)
The this template base.
3. $this_id (unknown)
The this id.

Usage

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

Defined (2)

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

/includes/emails/class-wc-email.php  
  1. $template_file = apply_filters( 'woocommerce_locate_core_template', $core_file, $template, $this->template_base, $this->id ); 
  1. $template_file = apply_filters( 'woocommerce_locate_core_template', $core_file, $template, $this->template_base, $this->id );