wc_get_attribute_type_label()WC 3.0.0

Get attribute type label.

Хуков нет.

Возвращает

Строку.

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

wc_get_attribute_type_label( $type );
$type(строка) (обязательный)
Attribute type slug.

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

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

Код wc_get_attribute_type_label() WC 8.7.0

function wc_get_attribute_type_label( $type ) {
	$types = wc_get_attribute_types();

	return isset( $types[ $type ] ) ? $types[ $type ] : __( 'Select', 'woocommerce' );
}