I have a custom post type and a custom taxonomy with custom capabilities.
I also have a custom user role.
When I edit my custom post type, logged in as user with custom role,
when I choose a taxonomy the ACF fields disappear.
When I click to the taxonomy an AJAX call occurs with action: acf/location/match_field_groups_ajax
This call return an empty array ->  and then the acf-hidden class is added to the acf postbox and the fields are disappearing.
When I’m doing the same thing, but logged in as Administrator, the AJAX call returns a number -> 
(This number is the number of the id of the acf postbox -> <div id=”acf_92″ class=”postbox acf_postbox default “> which contains the fields. )
and nothing wrong is happening.
To prevent this error I commented out this line -> add_action(‘wp_ajax_acf/location/match_field_groups_ajax’, array($this, ‘match_field_groups_ajax’));
The truth is I don’t like this solution.
How can I remove this action from my functions.php file?