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);
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.