wc_attributes_array_filter_visible( WC_Product_Attribute $attribute )
Callback for array filter to get visible only.
Description Description
Parameters Parameters
- $attribute
-
(Required) Attribute data.
Return Return
(bool)
Source Source
File: includes/wc-attribute-functions.php
function wc_attributes_array_filter_visible( $attribute ) {
return $attribute && is_a( $attribute, 'WC_Product_Attribute' ) && $attribute->get_visible() && ( ! $attribute->is_taxonomy() || taxonomy_exists( $attribute->get_name() ) );
}
Changelog Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |