Skip to content

Commit 1a10649

Browse files
committed
Use Address fullName helper property
1 parent 1057974 commit 1a10649

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

WooCommerce/Classes/ViewRelated/Orders/Order Details/Shipping Labels/WooShipping Create Shipping Labels/WooShippingCreateLabelsViewModel.swift

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -509,14 +509,8 @@ private extension Address {
509509
/// This prepares the address for use as a destination address in the shipping label.
510510
///
511511
func toWooShippingAddress() -> WooShippingAddress {
512-
// In this way we support localized name correctly,
513-
// because the order is often reversed in a few Asian languages.
514-
var components = PersonNameComponents()
515-
components.givenName = firstName
516-
components.familyName = lastName
517-
518512
return WooShippingAddress(company: company ?? "",
519-
name: PersonNameComponentsFormatter.localizedString(from: components, style: .medium, options: []),
513+
name: fullName,
520514
phone: phone ?? "",
521515
country: country,
522516
state: state,

0 commit comments

Comments
 (0)