Automattic\WooCommerce\Blocks\BlockTypes

ClassicTemplate::enqueue_dataprotectedWC 1.0

Extra data passed through from server to client for block.

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

Хуков нет.

Возвращает

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.
По умолчанию: array()

Код ClassicTemplate::enqueue_data() WC 10.8.1

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

	// Disable client-side navigation so that interactivity powered
	// components fall back to full page reload.
	wp_interactivity_config(
		'core/router',
		array(
			'clientNavigationDisabled' => true,
		)
	);
}