woocommerce_shared_settings хук-фильтрWC 1.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 )


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;
Settings data.

Список изменений

Deprecated since

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

woocommerce/packages/woocommerce-blocks/src/Assets/AssetDataRegistry.php 236
$settings = apply_filters( 'woocommerce_shared_settings', $this->data );

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

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