Automattic\WooCommerce\Blocks\BlockTypes

AbstractBlock::enqueue_assets()protectedWC 1.0

Enqueue frontend assets for this block, just in time for rendering.

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

Хуков нет.

Возвращает

null. Ничего.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->enqueue_assets( $attributes );
$attributes(массив) (обязательный)
Any attributes that currently are available from the block.

Код AbstractBlock::enqueue_assets() WC 7.5.1

protected function enqueue_assets( array $attributes ) {
	if ( $this->enqueued_assets ) {
		return;
	}
	$this->enqueue_data( $attributes );
	$this->enqueue_scripts( $attributes );
	$this->enqueued_assets = true;
}