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
- Get post meta in function hooked to transition_post_status
- How do I retrieve the slug of the current page?
- Most efficient way to get posts with postmeta
- Get posts by meta value
- Why does save_post action fire when creating a new post?
- Explanation of update_post_(meta/term)_cache
- what is correct way to hook when update post
- How to extract data from a post meta serialized array?
- Passing error/warning messages from a meta box to “admin_notices”
- How to save an array with one metakey in postmeta?
- WordPress is stripping escape backslashes from JSON strings in post_meta
- How can I get the post ID from a WP_Query loop?
- Check if Post Title exists, Insert post if doesn’t, Add Incremental # to Meta if does
- How to update_post_meta value as array
- Adding meta tag without plugin
- What’s the point of get_post_meta’s $single param?
- What is the different between an attachment in wp_posts and an attachment in wp_postmeta?
- Return $post_id when DOING_AUTOSAVE?
- How to edit a post meta data in a Gutenberg Block?
- Sanitizing integer input for update_post_meta
- post formats – how to switch meta boxes when changing format?
- update_post_meta and update_field ony working when saving the post
- Lack of composite indexes for meta tables
- Get a single post by a unique meta value
- trigger save_post event programmatically
- if get_post_meta is empty do something
- Unable to prevent function using save_post firing twice
- How we get_post_meta without post id
- How get post id from meta value
- What is the code to get the download link for a product in WooCommerce?
- Safe to delete blank postmeta?
- So much data in postmeta
- advanced custom fields update_field for field type: Taxonomy
- update_post_meta not saving when value is zero
- Custom post type save_post action not firing
- Meta compare with date (stored as string) not working
- flush_rewrite_rules on save_post Does Not Work on First Post Save
- Trying to get custom post meta through Jetpack JSON API [closed]
- How to update/insert custom field(post meta) data with wordpress REST API?
- What is the advantage of the wp_options design pattern?
- get_post_meta returning empty string when data shows in the database
- publish_post action hook doesn’t give post_meta_data
- Remove WordPress.org Meta link
- Remove post meta keys
- How to access the post meta of a post that has just been published?
- Why time functions show invalid time zone when using ‘c’ time format?
- A Post is saved twice or more during add_action(save_post)
- Why is get_post_meta returning an array when I specify it as single?
- How to update/delete array in post meta value?
- Adding an assisting editor box to Post page
- Actions or filters fired when data is saved in a custom table
- Why can’t I hook into save_posts after admin_init?
- Action ‘save_post’ not working for quick edit
- Get updated meta data after save_post hook
- Manipulating post meta in the customizer
- WPDB Multiple site’s posts and get featured images
- delete unused postmeta
- Should I sanitize custom post meta if it is going to be escaped later?