taxonomy_is_product_attribute()
Returns true when the passed taxonomy name is a product attribute.
No Hooks.
Return
true|false
.
Usage
taxonomy_is_product_attribute( $name );
- $name(string) (required)
- of the attribute.
taxonomy_is_product_attribute() taxonomy is product attribute code WC 9.4.2
function taxonomy_is_product_attribute( $name ) { global $wc_product_attributes; return taxonomy_exists( $name ) && array_key_exists( $name, (array) $wc_product_attributes ); }