Automattic\WooCommerce\Blocks\Templates
ClassicTemplatesCompatibility::init
Initialization method.
Метод класса: ClassicTemplatesCompatibility{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->init();
Код ClassicTemplatesCompatibility::init() ClassicTemplatesCompatibility::init WC 10.8.1
protected function init() { // phpcs:ignore WooCommerce.Functions.InternalInjectionMethod.MissingPublic
if ( ! wp_is_block_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' ) );
}
}