Automattic\WooCommerce\Blocks\BlockTypes

MiniCart::initialize()protectedWC 1.0

Initialize this block type.

  • Hook into WP lifecycle.
  • Register the block with WordPress.

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

Хуков нет.

Возвращает

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

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->initialize();

Код MiniCart::initialize() WC 8.7.0

protected function initialize() {
	parent::initialize();
	add_action( 'wp_loaded', array( $this, 'register_empty_cart_message_block_pattern' ) );
	add_action( 'wp_print_footer_scripts', array( $this, 'print_lazy_load_scripts' ), 2 );
	add_filter( 'hooked_block_types', array( $this, 'register_hooked_block' ), 10, 4 );
}