Automattic\WooCommerce\Blocks\Domain\Services

CheckoutFields::get_group_keypublic staticWC 1.0

Returns a group meta prefix based on its name.

Method of the class: CheckoutFields{}

No Hooks.

Returns

String. The group meta prefix.

Usage

$result = CheckoutFields::get_group_key( $group_name );
$group_name(string) (required)
The group name (billing|shipping|other).

CheckoutFields::get_group_key() code WC 9.9.4

public static function get_group_key( $group_name ) {
	if ( 'additional' === $group_name ) {
		wc_deprecated_argument( 'group_name', '8.9.0', 'The "additional" group is deprecated. Use "other" instead.' );
		$group_name = 'other';
	}
	if ( 'billing' === $group_name ) {
		return self::BILLING_FIELDS_PREFIX;
	}
	if ( 'shipping' === $group_name ) {
		return self::SHIPPING_FIELDS_PREFIX;
	}
	return self::OTHER_FIELDS_PREFIX;
}