Automattic\WooCommerce\Blocks\BlockTypes

ProductImage::enqueue_data()protectedWC 1.0

Extra data passed through from server to client for block.

Метод класса: ProductImage{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->enqueue_data( $attributes );
$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.
По умолчанию: []

Код ProductImage::enqueue_data() WC 8.7.0

protected function enqueue_data( array $attributes = [] ) {
	$this->asset_data_registry->add( 'isBlockThemeEnabled', wc_current_theme_is_fse_theme(), false );
}