WC_Comments::is_comment_excluded_from_wp_comment_counts │ private static │ WC 1.0

Determines whether the given comment should be included in the core WP comment counts that are displayed in the WordPress admin.

Метод класса: WC_Comments{}

Хуков нет.

Возвращает

bool.

Использование

$result = WC_Comments::is_comment_excluded_from_wp_comment_counts( $comment );
$comment(WP_Comment) (обязательный)
Comment object.

Код WC_Comments::is_comment_excluded_from_wp_comment_counts() WC 11.2.2

private static function is_comment_excluded_from_wp_comment_counts( $comment ) {
	return in_array( $comment->comment_type, array( 'action_log', 'note', 'order_note', 'webhook_delivery' ), true )
		|| get_post_type( $comment->comment_post_ID ) === 'product';
}