WC_Template_Loader::unsupported_theme_comments_number_filter()public staticWC 3.4.5

Suppress the comments number on the Shop page for unsupported themes since there is no commenting on the Shop page.

Method of the class: WC_Template_Loader{}

No Hooks.

Return

String.

Usage

$result = WC_Template_Loader::unsupported_theme_comments_number_filter( $comments_number );
$comments_number(string) (required)
The comments number text.

Changelog

Since 3.4.5 Introduced.

WC_Template_Loader::unsupported_theme_comments_number_filter() code WC 9.4.2

public static function unsupported_theme_comments_number_filter( $comments_number ) {
	if ( is_page( self::$shop_page_id ) ) {
		return '';
	}

	return $comments_number;
}