From 5fdde991c9ea8e505c1c430594fb32262a14acdf Mon Sep 17 00:00:00 2001 From: vnmedeiros Date: Sat, 13 Jul 2024 19:09:54 -0300 Subject: [PATCH] fix: get corrent erros on mapper save --- .../class-tainacan-rest-metadatum-mappers-controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/classes/api/endpoints/class-tainacan-rest-metadatum-mappers-controller.php b/src/classes/api/endpoints/class-tainacan-rest-metadatum-mappers-controller.php index ba2c02503..6420dc177 100644 --- a/src/classes/api/endpoints/class-tainacan-rest-metadatum-mappers-controller.php +++ b/src/classes/api/endpoints/class-tainacan-rest-metadatum-mappers-controller.php @@ -159,7 +159,7 @@ class REST_Metadatum_Mappers_Controller extends REST_Controller { } else { return new \WP_REST_Response([ 'error_message' => __('One or more values are invalid.', 'tainacan'), - 'errors' => $prepared->get_errors(), + 'errors' => $metadatum->get_errors(), 'metadatum' => $this->prepare_item_for_response($prepared, $request), ], 400); }