Automattic\WooCommerce\Blocks\BlockTypes
ProductFilterChips::enqueue_data
Extra data passed through from server to client for block.
Method of the class: ProductFilterChips{}
No Hooks.
Returns
void. 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()
ProductFilterChips::enqueue_data() ProductFilterChips::enqueue data code WC 11.0.1
protected function enqueue_data( array $attributes = array() ) {
parent::enqueue_data( $attributes );
if ( is_admin() ) {
$this->asset_data_registry->add( 'globalStylesColors', wp_get_global_styles( array( 'color' ) ) );
}
}