Return multiples taxonomies with wp_get_object_terms

wp_get_object_terms() accepts a third parameter which is an array of arguments passed to WP_Term_Query::get_terms which runs the actual SQL queries for the specific term request, and one of the arguments is named orderby which accepts term fields like name and taxonomy.

So you can use that 3rd parameter and set the orderby to taxonomy (and order to ASC) like so:

$workshop_terms = wp_get_object_terms( $post->ID, array( 'area', 'group' ), array(
    'orderby' => 'taxonomy',
    'order'   => 'ASC',
) );

Or the other way, is of course, call wp_get_object_terms() once for each of the taxonomies… ✌🙂

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)