acfe/php_load does not load fields in a plugin (autosync)
-
When I try to use autosync php for my field groups at a plugin path, ACF/ACFE does still load from DB.
This is the code used in the plugin:
add_action('acf/init', function(){ acf_update_setting('acfe/php_save', plugin_dir_path( __FILE__ ) . 'includes/acfe-php/'); $load_paths_php = acf_get_setting('acfe/php_load'); $load_paths_php[] = plugin_dir_path( __FILE__ ) . 'includes/acfe-php/'; acf_update_setting('acfe/php_load', $load_paths_php); });On saving a ACF field group, the file gets created correctly at this path, like “group_62333df612391.php”. The contents of the saved file also is correct (chmod 644, readable). But ACF still show it’s loaded from DB and the warning occurs:
Awaiting save. <br />Save path located in plugin: /pluginname/includes/acfe-php
When I disable the action to the default path (theme/acfe-php) it works. It gets saved to the theme folder and also loads from php and not from DB.
I also tried a fresh installation with a fresh database and could reproduce the problem.
Also, the path shows correctly at ACF » Settings » AutoSync » PHP Load.
And if I replace the path, instead of adding one, the problem still exists.
WP: 5.9.2 ACF: 5.11.4 ACF Pro 5.11.4 ACFE 0.8.8.7
The topic ‘acfe/php_load does not load fields in a plugin (autosync)’ is closed to new replies.