feat: add action o finish item submission

This commit is contained in:
vnmedeiros 2023-02-23 09:11:55 -03:00
parent 66c25f0deb
commit 5b914294e0
1 changed files with 1 additions and 0 deletions

View File

@ -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();