Automattic\WooCommerce\Blocks\BlockTypes

SavedForLater::initializeprotectedWC 1.0

Initialize this block type.

Method of the class: SavedForLater{}

No Hooks.

Returns

null. Nothing (null).

Usage

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

SavedForLater::initialize() code WC 10.9.4

protected function initialize(): void {
	parent::initialize();

	// We do not use `BlockHooksTrait` currently as it has issues with PHPStan.
	add_filter( 'hooked_block_types', array( $this, 'register_hooked_block' ), 9, 4 );
	add_filter( 'hooked_block_woocommerce/saved-for-later', array( $this, 'set_hooked_block_attributes' ), 10, 4 );
}