• Hi,
    I’m having problems to change the post status from ‘pending’ to a custom post status. I’m doing this inside Gutenberg editor with wp.data.dispatch('core/editor').editPost({ status: 'mandado_editar'});. This line executes well, the problem is when I save the post, it throws this error: “Failed to update. Message error: Not valid parameter: status”. Something weird is that if I try to change the post status to ‘draft’ it worked fine. Does the editPost() action in Gutenberg supports a custom post status as parameter?

    Thank you!
    Lucas.

Viewing 1 replies (of 1 total)
  • Tyler

    (@tylerthedude)

    Hi Lucas,

    The error returns, “Not valid parameter: status”, which indicates that the editPost method does not know the parameter in question. I’m not familiar with an alternative to what you’re trying to accomplish, but you should look at the Block Editor Handbook for the edit post module and hopefully you’ll find what you need. I will attach the link here.

    Regards,
    Tyler

Viewing 1 replies (of 1 total)
  • The topic ‘Can’t edit post status’ is closed to new replies.