WordPress at Your Fingertips
function is not described

WC_Template_Loader::comments_template_loader() public WC 1.0

Load comments template.

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

No Hooks.

Return

String.

Usage

$result = WC_Template_Loader::comments_template_loader( $template );
$template(string) (required)
template to load.

Code of WC_Template_Loader::comments_template_loader() WC 5.6.0

public static function comments_template_loader( $template ) {
	if ( get_post_type() !== 'product' ) {
		return $template;
	}

	$check_dirs = array(
		trailingslashit( get_stylesheet_directory() ) . WC()->template_path(),
		trailingslashit( get_template_directory() ) . WC()->template_path(),
		trailingslashit( get_stylesheet_directory() ),
		trailingslashit( get_template_directory() ),
		trailingslashit( WC()->plugin_path() ) . 'templates/',
	);

	if ( WC_TEMPLATE_DEBUG_MODE ) {
		$check_dirs = array( array_pop( $check_dirs ) );
	}

	foreach ( $check_dirs as $dir ) {
		if ( file_exists( trailingslashit( $dir ) . 'single-product-reviews.php' ) ) {
			return trailingslashit( $dir ) . 'single-product-reviews.php';
		}
	}
}