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

phpcs:ignore

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

add_filter( 'woocommerce_admin_preload_options', 'wp_kama_woocommerce_admin_preload_options_filter' );

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

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

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

Settings::add_component_settings()
woocommerce_admin_preload_options
Loader::add_component_settings()
woocommerce_admin_preload_options
woocommerce/src/Internal/Admin/Settings.php 151
$preload_options = apply_filters( 'woocommerce_admin_preload_options', array() );
woocommerce/src/Internal/Admin/Loader.php 339
$preload_options = apply_filters( 'woocommerce_admin_preload_options', array() );

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

woocommerce/src/Admin/Features/TransientNotices.php 25
add_filter( 'woocommerce_admin_preload_options', array( $this, 'preload_options' ) );
woocommerce/src/Internal/Admin/Homescreen.php 54
add_filter( 'woocommerce_admin_preload_options', array( $this, 'preload_options' ) );
woocommerce/src/Internal/Admin/Marketing.php 63
add_filter( 'woocommerce_admin_preload_options', array( $this, 'preload_options' ) );