Hi,
my name is Mariano and this is my first bug report so please bear with me :D
When I delete a future post using
wp_delete_post($post->ID)
it does not update the cron correctly.
I use this code to actually manually delete and unschedule the future posts
$posts = $wpdb->get_results( "SELECT ID FROM $wpdb->posts where post_status = 'future';" );
foreach ($posts as $post)
{
wp_clear_scheduled_hook( 'publish_future_post', $post->ID );
wp_delete_post($post->ID)<
}
Maybe a check if the post is of post_status future and then unscheduling it in the post deletion process would fix it.
I was not able to find the unschedule in post.php -> wp_delete_post
Thanks for consideration
Mariano