wc_get_template хук-фильтрWC 1.0

Allow 3rd party plugin filter template file from their plugin.

Использование

add_filter( 'wc_get_template', 'wp_kama_wc_get_template_filter', 10, 5 );

/**
 * Function for `wc_get_template` filter-hook.
 * 
 * @param  $template      
 * @param  $template_name 
 * @param  $args          
 * @param  $template_path 
 * @param  $default_path  
 *
 * @return 
 */
function wp_kama_wc_get_template_filter( $template, $template_name, $args, $template_path, $default_path ){

	// filter...
	return $template;
}
$template
-
$template_name
-
$args
-
$template_path
-
$default_path
-

Где вызывается хук

wc_get_template()
wc_get_template
WC_REST_System_Status_V2_Controller::get_theme_info()
wc_get_template
woocommerce/includes/wc-core-functions.php 313
$filter_template = apply_filters( 'wc_get_template', $template, $template_name, $args, $template_path, $default_path );
woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-system-status-v2-controller.php 1143
$located = apply_filters( 'wc_get_template', $file, $file, array(), WC()->template_path(), WC()->plugin_path() . '/templates/' );

Где используется хук в WooCommerce

Использование не найдено.