Home Forums Bug Reports add_filter('acf/fields/taxonomy/query') bug Reply To: add_filter('acf/fields/taxonomy/query') bug

  • It should be running, the acf ajax function works for whether or not your logged in.

    There is one of two things not going on.

    1) Your filter is not being added
    2) There is a PHP or JS error that happens that causes it break

    For the first, have you tried adding echo 'here'; die; just before the filter is added to make sure that line in your code is called.

    For the second, since it’s an ajax function you won’t be able to tell unless you turn WP error reporting on and log the errors to a file. The code you added `echo ‘<pre>’;
    print_r( $args );
    echo ‘</pre>’;
    ` will just cause a php error that causes the ajax to break.

    See debugging.

    add define('WP_DEBUG', true); define('WP_DEBUG_LOG', true);

    and then look in the file to see if any php error happen. For JS errors, you’ll need to look at your console and see if any JS errors are reported.