From 5b914294e04bef4a35109bdac39096a57a9e3e00 Mon Sep 17 00:00:00 2001 From: vnmedeiros Date: Thu, 23 Feb 2023 09:11:55 -0300 Subject: [PATCH] feat: add action o finish item submission --- .../api/endpoints/class-tainacan-rest-items-controller.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/classes/api/endpoints/class-tainacan-rest-items-controller.php b/src/classes/api/endpoints/class-tainacan-rest-items-controller.php index fa82fb78a..4ff4797b3 100644 --- a/src/classes/api/endpoints/class-tainacan-rest-items-controller.php +++ b/src/classes/api/endpoints/class-tainacan-rest-items-controller.php @@ -1388,6 +1388,7 @@ class REST_Items_Controller extends REST_Controller { if (empty($entities_erros) & $item->validate()) { $item = $this->items_repository->insert( $item ); delete_transient('tnc_transient_submission_' . $submission_id); + do_action('tainacan-submission-item-finish', $item, $request); return new \WP_REST_Response($this->prepare_item_for_response($item, $request), 201 ); } else { $this->submission_rollback_new_terms();