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

Filters the list of allowed block namespaces.

This hook defines which block namespaces should have block name and attribute data- attributes appended on render.

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

add_filter( '__experimental_woocommerce_blocks_add_data_attributes_to_namespace', 'wp_kama__experimental_woocommerce_blocks_add_data_attributes_to_namespace_filter' );

/**
 * Function for `__experimental_woocommerce_blocks_add_data_attributes_to_namespace` filter-hook.
 * 
 * @param array $allowed_namespaces List of namespaces.
 *
 * @return array
 */
function wp_kama__experimental_woocommerce_blocks_add_data_attributes_to_namespace_filter( $allowed_namespaces ){

	// filter...
	return $allowed_namespaces;
}
$allowed_namespaces(массив)
List of namespaces.

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

BlockTypesController::add_data_attributes()
__experimental_woocommerce_blocks_add_data_attributes_to_namespace
woocommerce/packages/woocommerce-blocks/src/BlockTypesController.php 87
$allowed_namespaces = array_merge( [ 'woocommerce', 'woocommerce-checkout' ], (array) apply_filters( '__experimental_woocommerce_blocks_add_data_attributes_to_namespace', [] ) );

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

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