woocommerce_admin_preload_options filter-hookWC 6.5.0

The woocommerce_admin_preload_options filter

Usage

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
-

Changelog

Since 6.5.0 Introduced.

Where the hook is called

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

Where the hook is used in WooCommerce

woocommerce/src/Admin/Features/TransientNotices.php 24
add_filter( 'woocommerce_admin_preload_options', array( $this, 'preload_options' ) );
woocommerce/src/Internal/Admin/Homescreen.php 53
add_filter( 'woocommerce_admin_preload_options', array( $this, 'preload_options' ) );