Add $args to wp_list_categories
The documentation for the wp_list_categories filter says that it: Filters the HTML output of a taxonomy list. So it filters the final HTML, not the args, but you’re returning $args, which means that the final HTML is replaced with the args array. That’s why you’re seeing “Array”. To filter the args for the categories list … Read more