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.

Хуков нет.

Возвращает

bool.

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

wc_array_filter_default_attributes( $attribute );
$attribute(разное) (обязательный)
Attribute being considered for exclusion from parent array.

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

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

Код wc_array_filter_default_attributes() WC 11.3.0

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