I encountered a similar issue and this is how I solved it. Note that I put in Fruits
as the taxonomy name based on your example. It’s important that this name matches the taxonomy name exactly. Often taxonomy names are singular, i.e. fruit
function wp4382_filter_terms_order( $orderby, $query_vars, $taxonomies ) {
if ( ! empty( $query_vars['object_ids'] )
&& ! empty( $taxonomies[0] )
&& ( 1 === count( $taxonomies ) )
&& 'Fruits' === $taxonomies[0] )
{
$orderby = 'tr.term_order';
}
return $orderby;
}
add_filter( 'get_terms_orderby', 'wp4382_filter_terms_order', 10, 3 );