wp_mail sending old content from post
There’s a few things you need to do here, you need to modify your add_action() to accept additional arguments and you need to specify whether to use the data before the update or the data after the update. Try something like this: function send_media_emails($post_id, $post_after){ if(defined(‘DOING_AUTOSAVE’) && DOING_AUTOSAVE) return; if(get_post_status($post_id) == ‘draft’ or get_post_status($post_id) == … Read more