I've tried the solution explaned here Display Woocommerce Product Category on cart and checkout page but this way all categories are displayed, I'm only interested in the parent category.
I used this code in checkout and cart foreach loop:
echo wc_get_product_category_list( $cart_item['product_id'] );
For example: I have these cat and sub cat
- MARIA
-- SEDIE
-- TAVOLI
- GIOVANNI
-- SEDIE
-- TAVOLI
If I use the code above, I will see the list of selected categories and subcategories; what I would like is to display only the parent categories (MARIA or GIOVANNI)
Thanks for support