WC_Template_Loader::init()
Hook in methods.
Метод класса: WC_Template_Loader{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$result = WC_Template_Loader::init();
Код WC_Template_Loader::init() WC Template Loader::init WC 9.4.2
public static function init() { self::$theme_support = wc_current_theme_supports_woocommerce_or_fse(); self::$shop_page_id = wc_get_page_id( 'shop' ); // Supported themes. if ( self::$theme_support ) { add_filter( 'template_include', array( __CLASS__, 'template_loader' ) ); add_filter( 'comments_template', array( __CLASS__, 'comments_template_loader' ) ); // Loads gallery scripts on Product page for FSE themes. if ( wc_current_theme_is_fse_theme() ) { self::add_support_for_product_page_gallery(); } } else { // Unsupported themes. add_action( 'template_redirect', array( __CLASS__, 'unsupported_theme_init' ) ); } }