Custom post type suppress transition from future to publish
The $post you’re working with is a WP_Post Object and you must interact with it as so. $post->post_status=”draft”; It’s usually not a good practice to modify the $post object directly so it’s something you may want to avoid. A better way may be to simply pass an array of values to wp_update_post() function like so: … Read more