Title: Using predefined attributes as variations doesn&#039;t return attribute description
Last modified: September 1, 2016

---

# Using predefined attributes as variations doesn't return attribute description

 *  Resolved [Rob](https://wordpress.org/support/users/qupodogbark/)
 * (@qupodogbark)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/using-predefined-attributes-as-variations-doesnt-return-attribute-description/)
 * When I create a custom attribute through Products -> Attributes
    And then add
   custom terms to this attribute with descriptions
 * And then create a variable product which uses those one of those attributes as
   a variation and use all terms as the variations…
 * I loop through the variation in my template and var_dump the variation and see
   description=””
    I guess that’s because it’s pulling on the description available
   from the product’s edit screen. But how can I pull the more general term definition
   that I entered when editing attributes.
 * (Sorry this is a bit confusing to explain, I can clarify if necessary…)
 * [https://wordpress.org/plugins/woocommerce/](https://wordpress.org/plugins/woocommerce/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [Rob](https://wordpress.org/support/users/qupodogbark/)
 * (@qupodogbark)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/using-predefined-attributes-as-variations-doesnt-return-attribute-description/#post-7690300)
 * I guess the variation is actually a different object (belonging to the product)
   than the term (belonging to the attribute) that it was generated from.
 * What would be the best way to grab the term object that a variation was created
   from, so that I can get the term description?
 * Thanks!
 *  [Caleb Burks](https://wordpress.org/support/users/icaleb/)
 * (@icaleb)
 * Automattic Happiness Engineer
 * [9 years, 9 months ago](https://wordpress.org/support/topic/using-predefined-attributes-as-variations-doesnt-return-attribute-description/#post-7690365)
 * Should be able to use this function: [https://codex.wordpress.org/Function_Reference/term_description](https://codex.wordpress.org/Function_Reference/term_description)
 * Just need to get the term ID from the attribute.
 *  Thread Starter [Rob](https://wordpress.org/support/users/qupodogbark/)
 * (@qupodogbark)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/using-predefined-attributes-as-variations-doesnt-return-attribute-description/#post-7690441)
 * Thank you, that helped.
 * I should mention for future people the term ID wasn’t immediately available from
   the attribute within the variation object. I had to use [get_term_by](https://codex.wordpress.org/Function_Reference/get_term_by)
   the slug, which was available in `$variation['attributes']['attribute']`

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Using predefined attributes as variations doesn't return attribute description’
is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [attributes](https://wordpress.org/support/topic-tag/attributes/)
 * [description](https://wordpress.org/support/topic-tag/description/)
 * [product](https://wordpress.org/support/topic-tag/product/)
 * [term](https://wordpress.org/support/topic-tag/term/)
 * [variable](https://wordpress.org/support/topic-tag/variable/)
 * [variation](https://wordpress.org/support/topic-tag/variation/)

 * 3 replies
 * 2 participants
 * Last reply from: [Rob](https://wordpress.org/support/users/qupodogbark/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/using-predefined-attributes-as-variations-doesnt-return-attribute-description/#post-7690441)
 * Status: resolved