[wp-trac] [WordPress Trac] #48790: Featured Image not available with transition_post_status hook with a fresh post

WordPress Trac noreply at wordpress.org
Mon Nov 25 23:43:11 UTC 2019


#48790: Featured Image not available with transition_post_status hook with a fresh
post
--------------------------+-----------------------------
 Reporter:  Kpudlo        |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  5.3
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48790>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list