Если кому-то интересно, то пофиксил так, не самый хороший подход, но все же:
class Structured_Data_List_Table extends ReviewsListTable {
protected function get_review_count(string $status, int $product_id): int
{
$args = [
'type__in' => ['review', 'comment'],
'status' => $this->convert_status_to_query_value($status),
'post_type' => 'product',
'post_id' => $product_id,
'count' => true,
];
$args['meta_query'] = [
[
'key' => 'custom_field',
'compare' => 'NOT EXISTS',
],
];
return (int)get_comments($args);
}
}
add_filter( 'woocommerce_product_reviews_list_table', 'replace_reviews_list_table_class', 10, 2 );
function replace_reviews_list_table_class( $output, $reviews_list_table ) {
$structured_data_list_table = new Structured_Data_List_Table();
$structured_data_list_table->prepare_items();
ob_start();
?>
<div class="wrap">
<h2><?php echo esc_html( get_admin_page_title() ); ?></h2>
<?php $structured_data_list_table->views(); ?>
<form id="reviews-filter" method="get">
<?php $page = isset( $_REQUEST['page'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['page'] ) ) : 'product-reviews'; ?>
<input type="hidden" name="page" value="<?php echo esc_attr( $page ); ?>" />
<input type="hidden" name="post_type" value="product" />
<input type="hidden" name="pagegen_timestamp" value="<?php echo esc_attr( current_time( 'mysql', true ) ); ?>" />
<?php $structured_data_list_table->search_box( __( 'Search Reviews', 'woocommerce' ), 'reviews' ); ?>
<?php $structured_data_list_table->display(); ?>
</form>
</div>
<?php
return ob_get_clean();
}