woocommerce_get_template

The WooCommerce woocommerce get template function.

Description

woocommerce_get_template( (string) $template_name, (array) $args = array(), (string) $template_path = '', (string) $default_path = '' ); 

Parameters (4)

0. $template_name (string)
The template name.
1. $args — Optional. (array) => array()
The args.
2. $template_path — Optional. (string) => ''
The template path.
3. $default_path — Optional. (string) => ''
The default path.

Usage

  1. if ( !function_exists( 'woocommerce_get_template' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-deprecated-functions.php'; 
  3.  
  4. // The template name. 
  5. $template_name = ''; 
  6.  
  7. // The args. 
  8. $args = array(); 
  9.  
  10. // The template path. 
  11. $template_path = ''; 
  12.  
  13. // The default path. 
  14. $default_path = ''; 
  15.  
  16. // NOTICE! Understand what this does before running. 
  17. $result = woocommerce_get_template($template_name, $args, $template_path, $default_path); 
  18.  

Defined (1)

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

/includes/wc-deprecated-functions.php  
  1. function woocommerce_get_template( $template_name, $args = array(), $template_path = '', $default_path = '' ) { 
  2. wc_deprecated_function( __FUNCTION__, '3.0', 'wc_get_template' ); 
  3. wc_get_template( $template_name, $args, $template_path, $default_path );