Get categories(tags or terms) of custom post type

$categories = get_terms('category', array(
 	'post_type' => array('post', 'product'),
 	'fields' => 'all'
));
Advertisements