I’m trying to get a repeater field value from an options page but it is returning only the row count. All of my code is within a custom plugin I’m building. I must be doing something too early in the WP/ACF load.
My field group is being set with acf_add_local_field_group
on the init
hook.
The options page is being set with acf_add_options_page
on the init
hook.
My other fields (a number field and a WYSIWYG field) are returning data just fine. It’s only the repeater’s subfields I’m having issues with. Field values are saving correctly to the database and the options page is working 100%.
It must have something to do with how/when I’m initializing the field group? Or perhaps because my code is within a plugin?
I knew the second I posted this, the cause would become clear. 🙄
I realized that my class instantiation was wrapped in an is_admin
condition. Hence the options page worked but I couldn’t get my data! I’m kicking myself.