How to show only tagged CPT categories / taxonomies for a custom post type?

wp_get_object_terms!

For example, if we want to grab all terms in a product taxonomy for a post we might do:

$product_terms = wp_get_object_terms( $post->ID,  'product' );
if ( ! empty( $product_terms ) ) {
    if ( ! is_wp_error( $product_terms ) ) {
        echo '<ul>';
            foreach( $product_terms as $term ) {
                echo '<li><a href="' . get_term_link( $term->slug, 'product' ) . '">' . esc_html( $term->name ) . '</a></li>'; 
            }
        echo '</ul>';
    }
}