Automattic\WooCommerce\Blocks\Domain\Services
CheckoutFields::get_group_name
Returns a group name based on passed group key.
Метод класса: CheckoutFields{}
Хуков нет.
Возвращает
Строку. The group meta prefix.
Использование
$result = CheckoutFields::get_group_name( $group_key );
- $group_key(строка) (обязательный)
- The group name (_wc_billing|_wc_shipping|_wc_other).
Код CheckoutFields::get_group_name() CheckoutFields::get group name WC 10.6.2
public static function get_group_name( $group_key ) {
if ( '_wc_additional' === $group_key ) {
wc_deprecated_argument( 'group_key', '8.9.0', 'The "_wc_additional" group key is deprecated. Use "_wc_other" instead.' );
$group_key = '_wc_other';
}
if ( 0 === \strpos( self::BILLING_FIELDS_PREFIX, $group_key ) ) {
return 'billing';
}
if ( 0 === \strpos( self::SHIPPING_FIELDS_PREFIX, $group_key ) ) {
return 'shipping';
}
return 'other';
}