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 ]; } } }