WP Cron and wp_insert_post

For those who stumble upon this later, use either option 1 or 2 found here: https://core.trac.wordpress.org/ticket/19373.

“For other developers who run into this and need to work around it, either of these 2 options work:
call wp_set_post_terms() to add your taxonomies after calling wp_insert_post()
set up a “current user” in your script before calling wp_insert_post()”

Leave a Comment