Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
WC_Template_Loader::get_template_loader_default_file()
Get the default filename for a template.
Description Description
Return Return
(string)
Source Source
File: includes/class-wc-template-loader.php
private static function get_template_loader_default_file() { if ( is_singular( 'product' ) ) { $default_file = 'single-product.php'; } elseif ( is_product_taxonomy() ) { $object = get_queried_object(); if ( is_tax( 'product_cat' ) || is_tax( 'product_tag' ) ) { $default_file = 'taxonomy-' . $object->taxonomy . '.php'; } else { $default_file = 'archive-product.php'; } } elseif ( is_post_type_archive( 'product' ) || is_page( wc_get_page_id( 'shop' ) ) ) { $default_file = self::$theme_support ? 'archive-product.php' : ''; } else { $default_file = ''; } return $default_file; }
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |