__experimental_woocommerce_blocks_add_data_attributes_to_block

__experimental_woocommerce_blocks_add_data_attributes_to_block

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

apply_filters('__experimental_woocommerce_blocks_add_data_attributes_to_block') is found 1 times:

  • /src/Blocks/BlockTypesController.php line 259
    		 * @since 5.9.0
    		 *
    		 * @param array $allowed_namespaces List of namespaces.
    		 */
    		$allowed_blocks = (array) apply_filters( '__experimental_woocommerce_blocks_add_data_attributes_to_block', array() );
    
    		$blocks_with_woo_parents   = $this->get_registered_blocks_with_woocommerce_parent();
    		$block_has_woo_parent      = in_array( $block_name, array_keys( $blocks_with_woo_parents ), true );
    		$in_allowed_namespace_list = in_array( $block_namespace, $allowed_namespaces, true );
    		$in_allowed_block_list     = in_array( $block_name, $allowed_blocks, true );