Cron task firing but function not working August 14, 2022 by Tarik Billa Figured it out… I needed to use $post->ID instead of get_the_ID().