fix: return only id of the deleted item

This commit is contained in:
vnmedeiros 2024-07-13 19:09:14 -03:00 committed by mateuswetah
parent d4e8fdadb7
commit 4590e12040
1 changed files with 4 additions and 2 deletions

View File

@ -933,9 +933,11 @@ class REST_Items_Controller extends REST_Controller {
$item = $this->items_repository->trash($item); $item = $this->items_repository->trash($item);
} }
$prepared_item = $this->prepare_item_for_response($item, $request); $item_deleted = array(
'id' => $item_id
);
return new \WP_REST_Response($prepared_item, 200); return new \WP_REST_Response($item_deleted, 200);
} }
/** /**