Hello,
I have my custom plugin that includes ACF if it is not installed.
So the structure of folders is like this :
my-plugin\admin\includes\lib\advanced-custom-fields-pro
So if plugin is not activated then I include ACF on my plugin… Everything seems ok until now.
But if I try to add a new field group and I change the value of “Show this field group if” then a network error is triggered with an error 400 Bad request.
This error is not triggered if I install/upload the plugin on the plugins page.
I can provide with credentials if needed.
Thanks in advance.
Pepe
The problem was caused by this
File structure
| +- PluginName
| +- admin
| +- admin.php
| +- lib
| +- advanced-custom-fields-pro/acf.php
| +- acf.php
| +- PluginName.php
so on the PluginName.php I required admin.php and admin.php was requesting acf.php if the class acf doesn’t exist… nothing very fancy and acf was working but all the admin ajax actions made by acf where throwing error 400.
So the solution was very easy; Just request (include) acf.php on the file PluginName.php instead of including acf on admin.php