WordPress at Your Fingertips
function is not described

WC_Template_Loader::init() public WC 1.0

Hook in methods.

{} It's a method of the class: WC_Template_Loader{}

No Hooks.

Return

null. Nothing.

Usage

$result = WC_Template_Loader::init();

Code of WC_Template_Loader::init() WC 5.6.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' ) );
	}
}