Opened 8 years ago
Closed 8 years ago
#46566 closed defect (bug) (duplicate)
get_post_thumbnail() is not working with transition_post_status hook
| Reported by: | ratnaraju | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Post Thumbnails | Version: | 5.0 |
| Severity: | critical | Keywords: | needs-codex |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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.