Preserve order from the Intuitive Custom Post Order plugin

<?php

add_filter( 'get_terms_args', function( $args, $taxonomies ) {
    if ( isset( $args['term_order'] ) ) {
        $args['orderby'] = 'term_order';
    }
    return $args;
}, 10, 2 );


add_filter( 'get_terms_orderby', function( $orderby, $query_vars, $taxonomies ) {
    return 'term_order' === $query_vars['orderby'] ? 'term_order' : $orderby;
}, 10, 3 );