WordPress at a glance
function is not described

wc_array_filter_default_attributes() WC 3.1.0

Callback for array filter to get default attributes. Will allow for '0' string values, but regard all other class PHP FALSE equivalents normally.

No Hooks.

Return

true|false. Nothing.

Usage

wc_array_filter_default_attributes( $attribute );
$attribute(mixed) (required)
Attribute being considered for exclusion from parent array.

Changelog

Since 3.1.0 Introduced.

Code of wc_array_filter_default_attributes() WC 5.3.0

<?php
function wc_array_filter_default_attributes( $attribute ) {
	return is_scalar( $attribute ) && ( ! empty( $attribute ) || '0' === $attribute );
}