WordPress fires the updated_{$meta_type}_meta hook which fires after the metadata is updated. In your case, the hook would be updated_post_meta
and you could have your function run on that hook instead of the save_post
hook.
Related Posts:
- Set default Custom Post Meta Value
- Execute action after post is saved with all related post_meta records (data)
- Content hooks vs User hooks
- Restrict post edit/delete based on user ID and custom field
- How to get all term meta for a taxonomy – getting term_meta for taxonomy
- Add post meta based on another post meta value before publish post
- Short of raw SQL, can I query for multiple attachment metadata that have a given array key?
- Triple meta_key on custom SELECT query
- Correct processing of `$_POST`, following WordPress Coding Standards
- update_post_meta() whenever custom post type is updated
- Delete post meta conditionally after save post
- Post IDs missing on delete_postmeta action hook
- MySQL Query To Select Post By Postmeta
- Plugin with action ‘save_post’ needs to press publish twice on order to publish
- Set Condition echo function get_post_meta
- Get a row from a separate table by matching a posts meta_key to a tables ID column
- Compare string with post id in wpdb and do stuff when match is found
- Read post meta values, only if posts are public
- Save post meta foreach loop
- How to test the outcome of a wpdb query?
- Update post meta within save_post action
- wordpress is_front_page() issue
- wpdb->get_var – count author posts, meta value
- How to query and update one colum in postmeta table?
- troubles with get_post_meta (and saving it)
- Display current ranking of post as a number in post title
- get specific values from WordPress meta_value
- Get data from custom table and update relative post_meta based on meta_key
- Get table parameter and save in meta value
- wp_insert_post inside save_post adds wrong metadata to inserted post
- How to call get_post()?
- Exclude category from DB query
- post_title in save_post action
- Fetching array of postmeta with $wpdb and in_array conditional
- Which query method to use? (edit- wpdb syntax problems)
- Cache metadata for set of posts
- Auto save title as custom meta field value
- How to get all the related ids without array?
- Remove action of an external plugin after checking if custom post meta is set
- Save frontend submission form field as custom field
- get_post_meta() returns nothing in save_post, publish_post, wp_after_insert_post
- if condition from post_meta not working in save_post
- Check if Post Title exists, Insert post if doesn’t, Add Incremental # to Meta if does
- How to update/insert custom field(post meta) data with wordpress REST API?
- Why can’t I hook into save_posts after admin_init?
- Change meta tags programatically
- How to get meta value in wp_attachment_metadata
- update_post_meta() not working in save_post
- Clean up output added via wp_head()
- unable to save post meta on single field with multiple selects
- How to generate numbers indistinguishable for the IDs of the posts
- get_post_meta remains empty while looping all menu items and using the ID
- how do I set a schedule event to modify all posts’s meta value weekly or monthly?
- How to stop wp_postmeta from being called on archive and search pages?
- Write automatic title at save_post (infinite loop)
- Set the value of custom field when post is published or updated
- WordPress front-end media (image) upload ERROR!
- running function during post save and adding variable to post meta
- update_post_meta saves nothing in database when run in publish_post
- Can’t access post meta on new post creation (cpt)
- Custom post meta values reset by autosave [duplicate]
- Compare meta_query with a Regular Expression and do a less-than operation on it
- cleaning up safely wordpress wp_postmeta table
- Using preg_replace to filter custom textarea
- Post meta as array looks like string instead of array
- Why does get_transient() always return string even if integer set?
- Author_meta ONLY if it exists
- save_post action doesn’t passing post id to my function as argument
- Is there a way to disable post meta caching for development?
- update_post_meta not working?
- Change wordpress meta tag description using WP functions
- Cant create or update meta fields using WordPress REST API
- Filter posts by meta key
- delete duplicates wp_postmeta
- Post Thumbnail missing when using webp format while sharing
- Bulk Update Post Meta Values from Different Post via Rest Api
- update_post_meta() is not saving the value
- How to register post meta with multi level arrays?
- If I disable screen options, does WP still try to update post meta?
- Can we have duplicate key pair values in post meta data?
- I created a Custom Meta Box but it is not displaying the value on my post page
- Meta data being pulled from wp-login.php
- Rename image filename using ‘media_handle_upload’
- Update Post metafield of specific categories
- Custom post type meta fields missing on save_post_type
- Using Self Hosted Video URL With Custom Fields
- Multiple postmeta values to the same post_id/meta_key combination?
- get_post_meta not work in php foreach
- Why are my custom metaboxes not updating the post meta?
- Problem serializing single quote and double quote into post meta
- Storing post_meta fields in array
- Performace on 1 million plus meta fields vs 1 field with 1 million multi array
- Query postmeta values, and return multiple post_titles for common meta value
- Piklist File Upload
- how to echo/display the custom field value in specific custom field name?
- update_post_meta() not working in bulk option
- How to update the ‘modified_time’ of a post ONLY when content is changed?
- Multiple If else statements on Search Result Page
- Adding an orderby filter, casting postmeta with multiple keys
- get_children filter with postmeta