Open johnbillion opened 5 years ago
Thanks for creating this report, @johnbillion. On the face of it, it's a pretty big oversight. I'll have to have a think and trawl through git history to see if I had a reason for not including these (I have a suspicion that an earlier version may have removed them), but generally I think this is something that should be re-added soon.
Expected behaviour
The drivers included in Wordhat should include
update()
methods in theirContentElement
classes so that a context can call$this->getDriver()->content->update($args)
to update an existing post.Current behaviour
None of the drivers implement the
ContentElement::update()
method, so this is not possible.Context
As a workaround, I tried calling the
create()
method (via thecreateContent()
method available on the context) and including anID
argument, but this doesn't work with the Wpcli driver. The error is:WP-CLI doesn't support the
--ID
argument forwp post create
and returns this error for a standalone command such as:Your environment