Automattic\WooCommerce\Blocks\Templates

ClassicTemplatesCompatibility::init()protectedWC 1.0

Initialization method.

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

Хуков нет.

Возвращает

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

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

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

Код ClassicTemplatesCompatibility::init() WC 9.8.5

protected function init() { // phpcs:ignore WooCommerce.Functions.InternalInjectionMethod.MissingPublic
	if ( ! wc_current_theme_is_fse_theme() ) {
		add_action( 'template_redirect', array( $this, 'set_classic_template_data' ) );
		// We need to set this data on the widgets screen so the filters render previews.
		add_action( 'load-widgets.php', array( $this, 'set_filterable_product_data' ) );
	}
}