Skip to content

Commit 6171a1c

Browse files
committed
Add support to set addresses
1 parent 0db2770 commit 6171a1c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

WooCommerce/Classes/ViewRelated/Orders/Order Creation/Synchronizer/LocalOrderSynchronizer.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ private extension LocalOrderSynchronizer {
7070
ProductInputTransformer.update(input: productInput, on: order)
7171
}
7272
.assign(to: &$order)
73+
74+
setAddresses.withLatestFrom(orderPublisher)
75+
.map { addressesInput, order in
76+
order.copy(billingAddress: addressesInput?.billing, shippingAddress: addressesInput?.shipping)
77+
}
78+
.assign(to: &$order)
7379
}
7480
}
7581

@@ -136,4 +142,3 @@ private struct ProductInputTransformer {
136142
attributes: [])
137143
}
138144
}
139-

0 commit comments

Comments
 (0)