Hi,
I am trying to update an oEmbed field with the update_field function, where I am doing something similar to this:
$youtube_video = 'https://www.youtube.com/watch?v=QILiHiTD3uc';
$post_id = 12;
update_field('monkey_video', $youtube_video, $post_id);
But it doesn’t work. Am I doing something wrong? Couldn’t find any documentation on the topic.
Thanks,
Ted.
Are you attempting to update a field that does not already have a value? If so the you should be using the field key in update field and not the field name. See the field key section of https://www.advancedcustomfields.com/resources/update_field/