Akamai needs to purge cache upon post deletion and post_save hook is not enough to do that. Because post_save happens after the update and then in the purgeOnPost function we have a condition to not purge if the post is not published.
if ( ! is_object( $post ) || $post->post_status != 'publish' ) { return true; }
wp_trash_post happens before trashing and it will fix the problem.
Akamai needs to purge cache upon post deletion and post_save hook is not enough to do that. Because post_save happens after the update and then in the purgeOnPost function we have a condition to not purge if the post is not published.
if ( ! is_object( $post ) || $post->post_status != 'publish' ) { return true; }
wp_trash_post happens before trashing and it will fix the problem.