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

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

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

/**
 * Function for `wc_get_template` filter-hook.
 * 
 * @param  $file                             
 * @param  $array                            
 * @param  $WC()->template_path              
 * @param  $WC()->plugin_path()  /templates/ 
 *
 * @return 
 */
function wp_kama_wc_get_template_filter( $file, $array, $WC()->template_path, $WC()->plugin_path()  /templates/ ){

	// filter...
	return $file;
}
$file
-
$array
-
$WC()->template_path
-
$WC()->plugin_path() /templates/
-

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

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

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

woocommerce/src/Blocks/Domain/Services/Notices.php 46
add_filter( 'wc_get_template', [ $this, 'get_notices_template' ], 10, 5 );