Thanks for the explanation.
The field group registered via PHP is saved in the PHP file. This page should give you more idea about it: https://www.advancedcustomfields.com/resources/register-fields-via-php/.
So when the page load, ACF will check if there’s a field registered in the PHP file. If they are, ACF will show it accordingly.
But I think I know your goal now. I believe you want to add/modify a field group to the database, but via PHP code, right? In this case, you need to check the source code to see how ACF adds a new field. You can check the
acf_update_field_group() function, which is located in “/wp-content/plugins/advanced-custom-fields-pro/api/api-field-group.php”.
I hope this helps 🙂
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!