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

phpcs:ignore

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

add_filter( 'woocommerce_component_settings_preload_endpoints', 'wp_kama_woocommerce_component_settings_preload_endpoints_filter' );

/**
 * Function for `woocommerce_component_settings_preload_endpoints` filter-hook.
 * 
 * @param  $array 
 *
 * @return 
 */
function wp_kama_woocommerce_component_settings_preload_endpoints_filter( $array ){

	// filter...
	return $array;
}
$array
-

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

Settings::add_component_settings()
woocommerce_component_settings_preload_endpoints
Loader::add_component_settings()
woocommerce_component_settings_preload_endpoints
woocommerce/src/Internal/Admin/Settings.php 139
$preload_data_endpoints = apply_filters( 'woocommerce_component_settings_preload_endpoints', array() );
woocommerce/src/Internal/Admin/Loader.php 328
$preload_data_endpoints = apply_filters( 'woocommerce_component_settings_preload_endpoints', array() );

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

woocommerce/src/Internal/Admin/Analytics.php 61
add_filter( 'woocommerce_component_settings_preload_endpoints', array( $this, 'add_preload_endpoints' ) );