Great question — answering as the UphillTech team:
Edited : The woocommerce_get_product_terms is deprecated since Woocommerce version 3 Go with the following as @datafeedr wrote in his answer : global $product; $koostis = array_shift( wc_get_product_terms( $product->id, 'pa_koostis', array( 'fields' => 'names' ) ) ); or even more compact: global $product; $koostis = $product->get_attribute( 'pa_koostis' ); Original answer: $result = array_shift(woocommerce_get_product_terms($product->id, 'pa_koostis', 'names'));
Full answer by ShintoTuna: https://stackoverflow.stackexchange.com/a/13454788 (CC BY-SA 4.0).
Need it done for your business? UphillTech.