Support

Account

Home Forums Bug Reports update_field() inconsistency Reply To: update_field() inconsistency

  • I’m not exactly sure where your the problem is, but I just tried inserting a new post and then updating a repeater field and it worked for me.

    Here is the test code that I ran

    
    $post = array(
      'post_type' => 'post',
      'post_title' => 'inserted post test 2',
      'post_status' => 'publish',
      'post_content' => 'test content',
    );
    $post_id = wp_insert_post($post);
    $value = array(
      array(
        'field_5c1abd1da3f56' => 'test update field'
      )
    );
    update_field('field_5c1abd11a3f55', $value, $post_id);