Automattic\WooCommerce\Blocks\Templates

ClassicTemplatesCompatibility::init()protectedWC 1.0

Initialization method.

Method of the class: ClassicTemplatesCompatibility{}

No Hooks.

Return

null. Nothing (null).

Usage

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

ClassicTemplatesCompatibility::init() code WC 9.4.2

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