#48790 closed defect (bug) (duplicate)
Featured Image not available with transition_post_status hook with a fresh post
Reported by: | Kpudlo | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.3 |
Component: | Post Thumbnails | Keywords: | |
Focuses: | Cc: |
Description
When using the transition_post_status
with Gutenberg, it is impossible to use the get_post_thumbnail_id
of the post that is being published that has not previously been saved. Shouldn't this hook be able to grab this information?
This seems to only be an issue when a featured image is added to a post and is not saved before being published. If the post is scheduled it seems to work fine, or if is saved immediately prior to publishing it seems to work fine.
transition_post_status
allows you to use get_post_thumbnai_id
with the Classic Editor just fine.
Change History (3)
Note: See
TracTickets for help on using
tickets.
@Kpudlo Thanks for reporting the issue. This looks very similar to the problem reported in #46566. I noticed that ticket was also closed as a duplicate of #45114, so I'll do the same here if that's ok.