From d8c27379ec94e1350d096e1b6ceaad73ec2e5623 Mon Sep 17 00:00:00 2001 From: gikaragia Date: Tue, 14 May 2024 15:54:18 +0300 Subject: [PATCH] Move $meta_value to not be undefined --- wp-job-manager-functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-job-manager-functions.php b/wp-job-manager-functions.php index 51d8e370d..400a8a089 100644 --- a/wp-job-manager-functions.php +++ b/wp-job-manager-functions.php @@ -351,6 +351,7 @@ function job_manager_construct_secondary_conditions( $search_term, $is_excluding $not_string = $is_excluding ? 'NOT ' : ''; $conditions = []; + $meta_value = $wildcard_search . $wpdb->esc_like( $search_term ) . $wildcard_search; /** * Can be used to disable searching post meta for job searches. @@ -359,7 +360,6 @@ function job_manager_construct_secondary_conditions( $search_term, $is_excluding */ if ( apply_filters( 'job_listing_search_post_meta', true ) ) { - $meta_value = $wildcard_search . $wpdb->esc_like( $search_term ) . $wildcard_search; // Only selected meta keys. if ( $searchable_meta_keys ) { $meta_keys = implode( "','", array_map( 'esc_sql', $searchable_meta_keys ) );