I am trying to get the value of a post_meta when the post is published. The problem is that all I can get is the post ID, but the post_meta must not yet be in the database when I make the query. I do not know to get this hook to fire after all of the post_meta for the post has been saved:
function get_some_meta($post) {
$feat_img = get_post_meta($post->ID, 'feat_img', true); // This has not yet been saved, so I can not retrieve it...
// Do something with $feat_img...
}
add_action('save_post', 'get_some_meta', 11, 1);
Read more here: Accessing post_meta on save of new post