wc_has_custom_attribute_types()
Check if there are attribute types different than the default select type. Note: wc-visual is considered a custom attribute type.
Хуков нет.
Возвращает
true|false. True if there are custom types, otherwise false.
Использование
wc_has_custom_attribute_types();
Список изменений
| С версии 3.3.2 | Введена. |
Код wc_has_custom_attribute_types() wc has custom attribute types WC 10.9.1
function wc_has_custom_attribute_types() {
$types = wc_get_attribute_types();
return 1 < count( $types ) || ! array_key_exists( 'select', $types );
}