How to load terms of a custom taxonomy of a product in woocommerce cart page

found the code that do the trick

$terms = get_the_terms( $product_id, 'my_taxo' );
foreach ($terms as $term) {
$product_cat = $term->name;
}
echo $product_cat ;

from below discussion
https://stackoverflow.com/questions/33495716/get-the-product-categories-and-display-it-on-cart-page-woocommerce
Thanks for the authors