Automattic\WooCommerce\Internal\POS

Capabilities::preset_label │ public static │ WC 11.0.0

Translated label for a POS preset.

Метод класса: Capabilities{}

Хуков нет.

Возвращает

string. Empty string for an unknown preset.

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

$result = Capabilities::preset_label( $preset ): string;
$preset(строка) (обязательный)
One of the POSPreset constants.

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

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

Код Capabilities::preset_label() WC 11.2.2

public static function preset_label( string $preset ): string {
	$definitions = self::preset_definitions();

	return isset( $definitions[ $preset ] ) ? $definitions[ $preset ]['label'] : '';
}