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);
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
2022 was a big year for Advanced Custom Fields, with more capabilities, a new generation of ACF Blocks, a refreshed UI, and a new home. Our year in review post looks at advancements we’ve made and offers a glimpse of the future.— Advanced Custom Fields (@wp_acf) January 6, 2023
© 2023 Advanced Custom Fields.