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.


Top ↑

Return Return

(bool)


Top ↑

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() ) );
}

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.