I'm not a developer - I've researched this and just can't figure it out. Many thanks for any help you can give me!
I am trying to get the product attribute AND the attribute description. (I'm using this to create custom variables to use in my Follow-Up Emails.)
I am able to get the attribute name with this:
global $product;
$venuearr = wc_get_product_terms( 16624, 'pa_venue', array( 'fields' => 'names' ) );
But if I change names to descriptions, it doesn't work.
global $product;
$venuearr = wc_get_product_terms( 16624, 'pa_venue', array( 'fields' => 'descriptions' ) );
If I change names to all, I can see the attribute (pa_venue) description, but I can't get it to retrieve on its own. What am I doing wrong?
Array ( [0] => WP_Term Object ( [term_id] => 417 [name] => DiMenna Center for Classical Music [slug] => dimenna-center-for-classical-music [term_group] => 0 [term_taxonomy_id] => 417 [taxonomy] => pa_venue [description] => test [parent] => 0 [count] => 1 [filter] => raw ) )