Open bonny opened 1 year ago
Same here, did you find a solution?
Unless there's now a hook provided by WordPress to replace the component to save posts, there's no other means to use a custom status within the Block Editor. If you find one, be my guest and submit a pull request :)
Hmm, that's unfortunate. Hopefully the Block Editor will support custom post statuses anytime soon. However, based on this issue, which is almost as old as Gutenberg itself, it doesn't seem to have any priority.
I have a Gutenberg Block that fetches posts from a custom post type. The custom post type does have a custom status registered.
The code in the block look something like this:
I see that a check is in place to
But it seems like this check also is true when getting pages from a block because the referer value seems to be the same as for the edit post api call.
I have solved this by checking if
custom_status
exists and use that value with a fallback tostatus
, but I guess this would be a problem for other third party blocks that does not have this check.