File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
WooCommerce/Classes/ViewModels/Booking Details Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -176,7 +176,9 @@ private extension BookingDetailsViewModel {
176176
177177 @MainActor
178178 func updateHeader( with customer: Customer ) {
179- headerContent. update ( with: customer)
179+ if let billingAddress = customer. billing {
180+ headerContent. update ( with: billingAddress)
181+ }
180182 }
181183
182184 func insertCustomerSectionIfAbsent( ) {
Original file line number Diff line number Diff line change 11import Foundation
22import struct Yosemite. Booking
33import struct Yosemite. Customer
4+ import struct Networking. Address
45
56extension BookingDetailsViewModel {
67 final class HeaderContent : ObservableObject {
@@ -31,10 +32,10 @@ extension BookingDetailsViewModel {
3132 }
3233
3334 @MainActor
34- func update( with customer : Customer ) {
35+ func update( with address : Address ) {
3536 let customerName = [
36- customer . firstName,
37- customer . lastName
37+ address . firstName,
38+ address . lastName
3839 ]
3940 . compactMap { $0 }
4041 . filter { !$0. isEmpty }
You can’t perform that action at this time.
0 commit comments