WP_QUERY returns empty set when fired from a WP-CRON scheduled event
Ok I spent an awful amount of time trying to debug this! Searching around I used $wpdb->queries along with define( ‘SAVEQUERIES’, true ); to debug queries made when wp-cron was running. then I found out that when cron jobs were running, my query was set to ‘post_status’ => trash! No wonder I didn’t get any … Read more