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