wc_array_filter_default_attributes()
Callback for array filter to get default attributes. Will allow for '0' string values, but regard all other class PHP FALSE equivalents normally.
Хуков нет.
Возвращает
true|false
.
Использование
wc_array_filter_default_attributes( $attribute );
- $attribute(разное) (обязательный)
- Attribute being considered for exclusion from parent array.
Список изменений
С версии 3.1.0 | Введена. |
Код wc_array_filter_default_attributes() wc array filter default attributes WC 8.6.1
function wc_array_filter_default_attributes( $attribute ) { return is_scalar( $attribute ) && ( ! empty( $attribute ) || '0' === $attribute ); }