Skip to content

Commit 6c72c54

Browse files
committed
Fulfill Order: Shipping address is blank
1 parent bd09f10 commit 6c72c54

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

WooCommerce/Classes/ViewRelated/Orders/FulfillViewController.swift

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -301,20 +301,15 @@ private extension FulfillViewController {
301301
guard let cell = cell as? CustomerInfoTableViewCell else {
302302
fatalError()
303303
}
304-
305-
guard let address = order.shippingAddress ?? order.billingAddress else {
306-
cell.title = NSLocalizedString("Shipping details", comment: "Shipping title for customer info cell")
307-
cell.address = NSLocalizedString(
308-
"No address specified.",
309-
comment: "Fulfill order > customer info > where the physical shipping address would normally display."
310-
)
311-
312-
return
313-
}
304+
let shippingAddress = order.shippingAddress
314305

315306
cell.title = NSLocalizedString("Shipping details", comment: "Shipping title for customer info cell")
316-
cell.name = address.fullNameWithCompany
317-
cell.address = address.formattedPostalAddress
307+
cell.name = shippingAddress?.fullNameWithCompany
308+
cell.address = shippingAddress?.formattedPostalAddress ??
309+
NSLocalizedString(
310+
"No address specified.",
311+
comment: "Order details > customer info > shipping details. This is where the address would normally display."
312+
)
318313
}
319314

320315
/// Setup: Add Tracking Cell

0 commit comments

Comments
 (0)