wc_attributes_array_filter_visible()
Callback for array filter to get visible only.
No Hooks.
Return
true|false
.
Usage
wc_attributes_array_filter_visible( $attribute );
- $attribute(WC_Product_Attribute) (required)
- Attribute data.
Changelog
Since 3.0.0 | Introduced. |
wc_attributes_array_filter_visible() wc attributes array filter visible code WC 9.6.1
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() ) ); }