wc_attributes_array_filter_visible() │ WC 3.0.0

Callback for array filter to get visible only.

Хуков нет.

Возвращает

bool.

Использование

wc_attributes_array_filter_visible( $attribute );
$attribute(WC_Product_Attribute) (обязательный)
Attribute data.

Список изменений

С версии 3.0.0 Введена.

Код wc_attributes_array_filter_visible() WC 11.3.0

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