For ACF to successfully retrieve a field object, it must know the field key. The field object can’t be loaded from just the name.
The DB row:
meta_key = ‘_radio_button’, meta_value = ‘radio_button’ should look more like this:
meta_key = ‘_radio_button’, meta_value = ‘field_abc123’
I don’t doubt that this worked on an older version of ACF, but the modern day ACF requires a field key. It is important that you import the data correctly and use the field_key, not the field_name in the update_field function.
The trick here is how to get the field key…
Perhaps you could export the fields to PHP and include them in each install? This way, they are not in the DB and can all contain the same field key.
Would that help?
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 Advanced Custom Fields.