Title: taxonomy_is_product_attribute
Last modified: November 23, 2020

---

# taxonomy_is_product_attribute

 *  Resolved [catheg](https://wordpress.org/support/users/catheg/)
 * (@catheg)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/taxonomy_is_product_attribute/)
 * Hi there,
 * The taxonomy_is_product_attribute function returns false if you specify your 
   own ID of an attribute, is-it the normal behavior ?
 * Thx for your help.
 * Catherine.

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

 *  [Adam Heckler](https://wordpress.org/support/users/adamkheckler/)
 * (@adamkheckler)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/taxonomy_is_product_attribute/#post-13699707)
 * Catherine,
 * > The taxonomy_is_product_attribute function returns false if you specify your
   > own ID of an attribute, is-it the normal behavior ?
 * It looks like that function expects a string to be passed, not an ID number:
 * [https://github.com/woocommerce/woocommerce/blob/4.7.0/includes/wc-conditional-functions.php#L301](https://github.com/woocommerce/woocommerce/blob/4.7.0/includes/wc-conditional-functions.php#L301)
 * I would adjust your code to pass the name of the attribute.
 * If you need further help with custom code (it’s not something we can really help
   write or troubleshoot), you might want to check our [Customizations page](https://woocommerce.com/customizations/).
 * Thanks!
 *  Thread Starter [catheg](https://wordpress.org/support/users/catheg/)
 * (@catheg)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/taxonomy_is_product_attribute/#post-13700256)
 * I wasn’t very clear, by own ID, I mean to say slug.
 * For example if I create an attribute with :
    name : color slug: generated par
   woocommerce color
 * taxonomy_is_product_attribute(“color”) returns true
 * If I create an attribute with
    name : color slug : I change with my own value
   0101-color
 * taxonomy_is_product_attribute(“color”) returns false

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

The topic ‘taxonomy_is_product_attribute’ 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/)

 * 2 replies
 * 2 participants
 * Last reply from: [catheg](https://wordpress.org/support/users/catheg/)
 * Last activity: [5 years, 7 months ago](https://wordpress.org/support/topic/taxonomy_is_product_attribute/#post-13700256)
 * Status: resolved