Automattic\WooCommerce\Blocks\BlockTypes

FeaturedItem::initializeprotectedWC 1.0

Initialize the block.

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

Хуков нет.

Возвращает

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

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

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

Код FeaturedItem::initialize() WC 10.5.0

protected function initialize() {
	parent::initialize();
	add_filter( 'render_block_context', [ $this, 'update_context' ], 10, 3 );
	add_filter( 'render_block_core/post-title', [ $this, 'restore_global_post' ], 10, 3 );
}