WordPress at Your Fingertips
function is not described


FeaturedProduct::enqueue_data() protected WC 1.0

Extra data passed through from server to client for block.

{} It's a method of the class: FeaturedProduct{}

No Hooks.


null. Nothing.


// protected - for code of main (parent) or child class
$result = $this->enqueue_data( $attributes );
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: []

Code of FeaturedProduct::enqueue_data() WC 5.6.0

protected function enqueue_data( array $attributes = [] ) {
	parent::enqueue_data( $attributes );
	$this->asset_data_registry->add( 'min_height', wc_get_theme_support( 'featured_block::min_height', 500 ), true );
	$this->asset_data_registry->add( 'default_height', wc_get_theme_support( 'featured_block::default_height', 500 ), true );