woocommerce_get_template_part

The WooCommerce woocommerce get template part function.

Description

woocommerce_get_template_part( $slug, (string) $name = '' ); 

Parameters (2)

0. $slug
The slug.
1. $name — Optional. (string) => ''
The name.

Usage

  1. if ( !function_exists( 'woocommerce_get_template_part' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-deprecated-functions.php'; 
  3.  
  4. // The slug. 
  5. $slug = null; 
  6.  
  7. // The name. 
  8. $name = ''; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = woocommerce_get_template_part($slug, $name); 
  12.  

Defined (1)

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

/includes/wc-deprecated-functions.php  
  1. function woocommerce_get_template_part( $slug, $name = '' ) { 
  2. wc_deprecated_function( __FUNCTION__, '3.0', 'wc_get_template_part' ); 
  3. wc_get_template_part( $slug, $name );