Automattic\WooCommerce\Blocks\BlockTypes
Checkout::enqueue_assets()
Enqueue frontend assets for this block, just in time for rendering.
Метод класса: Checkout{}
Хуки из метода
Возвращает
null
. Ничего (null).
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->enqueue_assets( $attributes, $content, $block );
- $attributes(массив) (обязательный)
- Any attributes that currently are available from the block.
- $content(строка) (обязательный)
- The block content.
- $block(WP_Block) (обязательный)
- The block object.
Код Checkout::enqueue_assets() Checkout::enqueue assets WC 8.7.0
protected function enqueue_assets( array $attributes, $content, $block ) { /** * Fires before checkout block scripts are enqueued. * * @since 4.6.0 */ do_action( 'woocommerce_blocks_enqueue_checkout_block_scripts_before' ); parent::enqueue_assets( $attributes, $content, $block ); /** * Fires after checkout block scripts are enqueued. * * @since 4.6.0 */ do_action( 'woocommerce_blocks_enqueue_checkout_block_scripts_after' ); }