Automattic\WooCommerce\Blocks\BlockTypes
Cart::enqueue_assets
Enqueue frontend assets for this block, just in time for rendering.
Метод класса: Cart{}
Хуки из метода
Возвращает
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.
Код Cart::enqueue_assets() Cart::enqueue assets WC 11.0.1
protected function enqueue_assets( array $attributes, $content, $block ) {
/**
* Fires before cart block scripts are enqueued.
*
* @since 2.6.0
*/
do_action( 'woocommerce_blocks_enqueue_cart_block_scripts_before' );
parent::enqueue_assets( $attributes, $content, $block );
/**
* Fires after cart block scripts are enqueued.
*
* @since 2.6.0
*/
do_action( 'woocommerce_blocks_enqueue_cart_block_scripts_after' );
}