title: wp_update_post is duplicating my post
body: <p>I have this function and it is suppose to change the post status of a custom post type if it has two meta values. Right now if it matches the two values instead of just changing the status, it creates 2 new posts sets them to the new post_status, and leaves the original post in the original status.</p>
  
  <p>Here is the function I am using:</p>
  
  <pre><code>function set_reg_emails(){
      wp_reset_postdata();
                  $regargs = array (
      'nopaging'               =&gt; true,
      'post_type'              =&gt; 'trip_reg',
      //'fields'               =&gt; 'ids',
      'post_status'            =&gt; 'draft'
  );
  
  // The Query
  $the_reg_query = new WP_Query( $regargs );
  if ( $the_reg_query-&gt;have_posts() ) {
  
      while ( $the_reg_query-&gt;have_posts() ) {
          $the_reg_query-&gt;the_post();
          $send_email = 'no';
          $reg_basic_form = get_post_meta( $the_reg_query-&gt;post-&gt;ID, 'reg_basic_form', true );
          $reg_medical_form = get_post_meta( $the_reg_query-&gt;post-&gt;ID, 'reg_basic_form', true );
          $reg_trip_id = get_post_meta( $the_reg_query-&gt;post-&gt;ID, '__relate_post', true );
          $reg_trip_beg_date = get_post_meta( $reg_trip_id, 'trip_begin', true );
          $prayer_title= get_the_title();
          $reg_userdata = get_userdata(get_post_meta( $the_reg_query-&gt;post-&gt;ID, 'reg_user', true ));
          $reg_author  = get_userdata(get_the_author_meta('ID'));
          //$prayer_edit_link = admin_url( 'post.php?post=' . $the_reg_query-&gt;post-&gt;ID . '&amp;action=edit');
          if($reg_basic_form == "True" &amp;&amp; $reg_medical_form == "True"){
               if ( ! wp_is_post_revision( $the_job_query-&gt;post-&gt;ID ) ){
                   $my_new_post = array();
                   $my_new_post['ID'] = $the_job_query-&gt;post-&gt;ID;
                   $my_new_post['post_status'] = 'approved';
              wp_update_post( $my_new_post );
               }
              goto skipemail;
          }
  
  
       skipemail:  
      }
  }
  wp_reset_postdata();
  }
  </code></pre>