WP REST API: Stale Post Status on DELETE of Post
|Reported by:||timmydcrawford||Owned by:||rmccue|
|Component:||REST API||Keywords:||has-unit-tests has-patch|
When issuing a DELETE against a post or page in the WP REST API, the response sends the original post object, which includes the post.status prior to the DELETE operation being completed.
The returned object, since the context is edit, shows the post.status, and it does not show the post with a status=trash, which is what I would expect after the DELETE operation completes. Instead, the status of the post prior to the DELETE operation is shown.
Additionally, when DELETE'ing a revision on a post or a page, the response sent back after the request simply says "true". Seems like the DELETE operations should return a similar response for all operations across the API.
Change History (20)
- Keywords needs-patch added; has-patch removed
- Owner set to rmccue
- Status changed from new to assigned
- Keywords has-patch added; needs-patch removed
- Type changed from defect (bug) to enhancement