Automattic\WooCommerce\Blocks\BlockTypes

MiniCart::initialize()protectedWC 1.0

Initialize this block type.

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

Method of the class: MiniCart{}

No Hooks.

Return

null. Nothing (null).

Usage

// protected - for code of main (parent) or child class
$result = $this->initialize();

MiniCart::initialize() code WC 9.4.2

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 );
}