Automattic\WooCommerce\Blocks\BlockTypes

ProductFilterAttribute::enqueue_data()protectedWC 1.0

Extra data passed through from server to client for block.

Method of the class: ProductFilterAttribute{}

No Hooks.

Return

null. Nothing (null).

Usage

// protected - for code of main (parent) or child class
$result = $this->enqueue_data( $attributes );
$attributes(array)
Any attributes that currently are available from the block. Note, this will be empty in the editor context when the block is not in the post content on editor load.
Default: array()

ProductFilterAttribute::enqueue_data() code WC 9.4.2

protected function enqueue_data( array $attributes = array() ) {
	parent::enqueue_data( $attributes );

	if ( is_admin() ) {
		$this->asset_data_registry->add( 'defaultProductFilterAttribute', $this->get_default_product_attribute() );
	}
}