WC_Template_Loader::init() public WC 1.0
Hook in methods.
{} Это метод класса: WC_Template_Loader{}
Хуков нет.
Возвращает
Null. Ничего.
Использование
$result = WC_Template_Loader::init();
Код WC_Template_Loader::init() WC Template Loader::init WC 5.0.0
public static function init() {
self::$theme_support = current_theme_supports( 'woocommerce' );
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' ) );
} else {
// Unsupported themes.
add_action( 'template_redirect', array( __CLASS__, 'unsupported_theme_init' ) );
}
}