I am building a WP plugin and have integrated ACF (free version) as per the documentation on their website: https://www.advancedcustomfields.com/resources/including-acf-in-a-plugin-theme/
I also use a series of filters to load the ACF fields based on the location setting:
$this->loader->add_filter( 'acf/location/rule_types', $plugin_admin, 'acf_location_rules_types' );
$this->loader->add_filter( 'acf/location/rule_values/cpt', $plugin_admin, 'acf_location_rules_values_cpt' );
$this->loader->add_filter( 'acf/location/rule_match/cpt', $plugin_admin, 'acf_location_rules_match_cpt', 10, 3 );
This code is based on this simple plugin: https://github.com/lukechapman/custom-post-template-support-for-acf/blob/master/acf-custom-post-template-support.php
Everything has worked absolutely perfectly, but since I have upgraded to ACF pro this has completely stopped working.
I can't seem to find any resources specific to adding filters for ACF pro, only the basic version. I've debugged it and can confirm paths are correct, no errors in logs, and I also added some debug code to the first callback function acf_location_rules_types() and this is not being called at all.
The script that loads the filters is working, but it's like the filter options no longer exist in ACF Pro.
Where am I going wrong with this?
EDIT
I've also tried a very simple implementation like this which is also not being called:
add_filter('acf/location/rule_types', function ($rules) {
error_log('acf/location/rule_types debug');
return false;
});