WordPress – get categories

$type = wp_get_post_terms(get_the_ID(),’custom_catergories’,[‘fields’=>’names’]);

$terms = get_terms( array(
‘taxonomy’ => ‘consultant_catergories’
));