Building on Loic's answer for an attribute of pa_manufacturer
:
if ( get_post_type( $post ) === 'product'&& ! is_a($product, 'WC_Product') ) { $product = wc_get_product( get_the_id() ); // Get the WC_Product Object}$product_attributes = $product->get_attributes(); // Get the product attributes// Output$manufacturer_id = $product_attributes['pa_manufacturer']['options']['0']; // returns the ID of the term$manufacturer_name = get_term( $manufacturer_id )->name; // gets the term name of the term from the IDecho '<p class="manufacturer">'.$manufacturer_name.'</p>'; // display the actual term name