get_terms filter not works early on edit-tags.php

i have a filter like:

add_filter ( 'get_terms', function ( $terms, $taxonomies, $args ) {

    // do anything with terms here...

    return $terms;

}, 10, 3 );

in my plugin.
In most/other cases the filter works fine. But if i try to filter the wp_count_terms () on edit-tags.php (which calls get_terms () function my filter is not fired)

some code around told me, this lines are loaded before wp_count_terms () are called.

Read more here: get_terms filter not works early on edit-tags.php

Leave a Reply

Your email address will not be published. Required fields are marked *