title: advanced custom fields - insert post programmatically and update repeater fields
body: <p>I've an issue with the plugin "Advanced Custom Fields". The steps that I follows are:</p>
  
  <p><strong>1. Create post programmatically</strong></p>
  
  <pre><code>$id_post = wp_insert_post(array(
      'post_type'=&gt;$post_type,
      'post_title'=&gt;$post_title, 
      'post_status' =&gt; 'publish'
  ));
  </code></pre>
  
  <p><strong>2. Update all the repeater fields associated to the "post_type"</strong></p>
  
  <pre><code>if( have_rows('cliente',$id_post) ) {
      $i = 0;
      while( have_rows('cliente',$id_post) ) {
         the_row();
         update_sub_field('id', 333);
      }
  }
  </code></pre>
  
  <p>The issue is at the point 2, infact when I create a post with Wordpress' interface (with a button) and i insert manually the id of that post in my code, it works perfectly..</p>
  
  <p>but when i create a post programmatically at the second point the repeater field isn't recognized even if I put the number of that post create programmatically. </p>
  
  <p>Works only if the post is create with the button "Insert New".</p>
  
  <p>Do you have any suggestion?</p>
  
  <p>Thanks to all! </p>