wc_pos_locate_template

Return template path.

Description

(mixed|void) wc_pos_locate_template( (string) $path = '' ); 

Returns (mixed|void)

Parameters (1)

0. $path — Optional. (string) => ''
The path.

Usage

  1. if ( !function_exists( 'wc_pos_locate_template' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-pos/includes/wc-pos-functions.php'; 
  3.  
  4. // The path. 
  5. $path = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wc_pos_locate_template($path); 
  9.  

Defined (1)

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

/includes/wc-pos-functions.php  
  1. function wc_pos_locate_template($path = '') { 
  2. $template = locate_template(array( 
  3. 'woocommerce-pos/' . $path 
  4. )); 
  5.  
  6. if( !$template ) { 
  7. $template = WC_POS_PLUGIN_PATH. 'includes/views/' . $path; 
  8.  
  9. if ( file_exists( $template ) ) { 
  10. return apply_filters('woocommerce_pos_locate_template', $template, $path);