WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Blocks\BlockTypes

ReviewsByProduct::enqueue_data() protected WC 1.0

Extra data passed through from server to client for block.

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

No Hooks.

Return

null. Nothing.

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: []

Code of ReviewsByProduct::enqueue_data() WC 5.7.0

protected function enqueue_data( array $attributes = [] ) {
	parent::enqueue_data( $attributes );
	$this->asset_data_registry->add( 'reviewRatingsEnabled', wc_review_ratings_enabled(), true );
	$this->asset_data_registry->add( 'showAvatars', '1' === get_option( 'show_avatars' ), true );
}