From ca6bc669bd0013f9662e4c773afae129a2bdc6e5 Mon Sep 17 00:00:00 2001 From: gkaragia <53191348+gkaragia@users.noreply.github.com> Date: Wed, 4 Oct 2023 13:19:19 +0300 Subject: [PATCH] Ignore slow query warnings --- .../promoted-jobs/class-wp-job-manager-promoted-jobs-api.php | 2 +- includes/promoted-jobs/class-wp-job-manager-promoted-jobs.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/promoted-jobs/class-wp-job-manager-promoted-jobs-api.php b/includes/promoted-jobs/class-wp-job-manager-promoted-jobs-api.php index 2bc251290..b003d5c60 100644 --- a/includes/promoted-jobs/class-wp-job-manager-promoted-jobs-api.php +++ b/includes/promoted-jobs/class-wp-job-manager-promoted-jobs-api.php @@ -187,7 +187,7 @@ public function get_items() { 'no_found_rows' => true, 'ignore_sticky_posts' => true, 'posts_per_page' => -1, - 'meta_query' => [ + 'meta_query' => [ // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query -- Returns promoted jobs only which should be a small number. [ 'key' => WP_Job_Manager_Promoted_Jobs::PROMOTED_META_KEY, 'compare' => 'EXISTS', diff --git a/includes/promoted-jobs/class-wp-job-manager-promoted-jobs.php b/includes/promoted-jobs/class-wp-job-manager-promoted-jobs.php index b2281f388..58cb72201 100644 --- a/includes/promoted-jobs/class-wp-job-manager-promoted-jobs.php +++ b/includes/promoted-jobs/class-wp-job-manager-promoted-jobs.php @@ -213,7 +213,7 @@ public static function query_promoted_jobs_count( $args = [] ) { 'post_status' => 'any', 'posts_per_page' => 1, 'fields' => 'ids', - 'meta_query' => [ + 'meta_query' => [ // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query -- Returns promoted jobs only which should be a small number. [ 'key' => self::PROMOTED_META_KEY, 'value' => '1',