WC_Comments::is_comment_excluded_from_wp_comment_counts
Determines whether the given comment should be included in the core WP comment counts that are displayed in the WordPress admin.
Метод класса: WC_Comments{}
Хуков нет.
Возвращает
true|false
.
Использование
$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 Comments::is comment excluded from wp comment counts WC 10.0.2
private static function is_comment_excluded_from_wp_comment_counts( $comment ) { return in_array( $comment->comment_type, array( 'action_log', 'order_note', 'webhook_delivery' ), true ) || get_post_type( $comment->comment_post_ID ) === 'product'; }