WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Платформа для конвертации и монетизации трафика
функция не описана

WC_Comments::exclude_order_comments() public WC 1.0

Exclude order comments from queries and RSS.

This code should exclude shop_order comments from queries. Some queries (like the recent comments widget on the dashboard) are hardcoded. and are not filtered, however, the code current_user_can( 'read_post', $comment->comment_post_ID ) should keep them safe since only admin and. shop managers can view orders anyway.

The frontend view order pages get around this filter by using remove_filter('comments_clauses', array( 'WC_Comments' ,'exclude_order_comments'), 10, 1 );

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

Хуков нет.

Возвращает

Массив.

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

$result = WC_Comments::exclude_order_comments( $clauses );
$clauses(массив) (обязательный)
A compacted array of comment query clauses.

Код WC_Comments::exclude_order_comments() WC 5.0.0

<?php
public static function exclude_order_comments( $clauses ) {
	$clauses['where'] .= ( $clauses['where'] ? ' AND ' : '' ) . " comment_type != 'order_note' ";
	return $clauses;
}