From 7ae44316d36b7a92409dfc9abe434512f5c020e6 Mon Sep 17 00:00:00 2001 From: vnmedeiros Date: Wed, 26 Jan 2022 10:04:43 -0300 Subject: [PATCH] fix: translate prepare mapped meta queries --- src/classes/api/class-tainacan-rest-controller.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/classes/api/class-tainacan-rest-controller.php b/src/classes/api/class-tainacan-rest-controller.php index 3893762d8..3578a3e15 100644 --- a/src/classes/api/class-tainacan-rest-controller.php +++ b/src/classes/api/class-tainacan-rest-controller.php @@ -237,8 +237,8 @@ class REST_Controller extends \WP_REST_Controller { } else { foreach ( $query as $mapped_meta => $meta_v ) { - if(isset($request[$mapped][$meta_v])) { - $args[ $mapped_v ][ $meta_v ] = $request[ $mapped ][ $meta_v ]; + if(isset($request[$mapped][$mapped_meta])) { + $args[ $mapped_v ][ $meta_v ] = $request[ $mapped ][ $mapped_meta ]; } } }