Opened 6 years ago
Closed 6 years ago
#46566 closed defect (bug) (duplicate)
get_post_thumbnail() is not working with transition_post_status hook
Reported by: | ratnaraju | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | critical | Version: | 5.0 |
Component: | Post Thumbnails | Keywords: | needs-codex |
Focuses: | Cc: |
Description
from the latest version of WordPress, the function get_post_thumbnail_url is not working. Even if we write a wpdb query to fetch featured image not working. please suggest with solution.
Change History (1)
Note: See
TracTickets for help on using
tickets.
Hi @ratnaraju and welcome to trac!
This is due to the issue detailed in #45114, post meta (included featured images) and terms (tags, categories, custom taxonomies) are not updated until after
wp_update_post()
runs so the details are not available when saving via the REST API, which the new editor uses.Some ideas have been presented but a way forward hasn't been decided yet, I am afraid.
I'm marking this ticket as duplicate so discussion can continue in one place on #45114.