wc_array_filter_default_attributes( mixed $attribute )
Callback for array filter to get default attributes. Will allow for ‘0’ string values, but regard all other class PHP FALSE equivalents normally.
Description Description
Parameters Parameters
- $attribute
-
(Required) Attribute being considered for exclusion from parent array.
Return Return
(bool)
Source Source
File: includes/wc-attribute-functions.php
function wc_array_filter_default_attributes( $attribute ) {
return is_scalar( $attribute ) && ( ! empty( $attribute ) || '0' === $attribute );
}
Changelog Changelog
| Version | Description |
|---|---|
| 3.1.0 | Introduced. |