woocommerce_shared_settings filter-hookWC 5.0.0

Filters the array of shared settings.

Low level hook for registration of new data late in the cycle. This is deprecated. Instead, use the data api:

Automattic\WooCommerce\Blocks\Package::container()->get( Automattic\WooCommerce\Blocks\Assets\AssetDataRegistry::class )->add( $key, $value )

Usage

add_filter( 'woocommerce_shared_settings', 'wp_kama_woocommerce_shared_settings_filter' );

/**
 * Function for `woocommerce_shared_settings` filter-hook.
 * 
 * @param array $data Settings data.
 *
 * @return array
 */
function wp_kama_woocommerce_shared_settings_filter( $data ){

	// filter...
	return $data;
}
$data(array)
Settings data.

Changelog

Since 5.0.0 Introduced.
Deprecated since

Where the hook is called

AssetDataRegistry::initialize_core_data()
woocommerce_shared_settings
woocommerce/src/Blocks/Assets/AssetDataRegistry.php 239
$settings = apply_filters( 'woocommerce_shared_settings', $this->data );

Where the hook is used in WooCommerce

Usage not found.