Automattic\WooCommerce\Internal\POS

Capabilities::preset_label │ public static │ WC 11.0.0

Translated label for a POS preset.

Method of the class: Capabilities{}

No Hooks.

Returns

string. Empty string for an unknown preset.

Usage

$result = Capabilities::preset_label( $preset ): string;
$preset(string) (required)
One of the POSPreset constants.

Changelog

Since 11.0.0 Introduced.

Capabilities::preset_label() code WC 11.1.2

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

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