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

phpcs:ignore

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

add_filter( 'woocommerce_admin_preload_settings', 'wp_kama_woocommerce_admin_preload_settings_filter' );

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

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

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

Settings::add_component_settings()
woocommerce_admin_preload_settings
Loader::add_component_settings()
woocommerce_admin_preload_settings
woocommerce/src/Internal/Admin/Settings.php 159
$preload_settings = apply_filters( 'woocommerce_admin_preload_settings', array() );
woocommerce/src/Internal/Admin/Loader.php 346
$preload_settings = apply_filters( 'woocommerce_admin_preload_settings', array() );

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

woocommerce/src/Internal/Admin/Onboarding/OnboardingSetupWizard.php 48
add_filter( 'woocommerce_admin_preload_settings', array( $this, 'preload_settings' ) );