We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b82a1b commit e930a00Copy full SHA for e930a00
WooCommerce/Classes/ViewRelated/Orders/Order Creation/Synchronizer/LocalOrderSynchronizer.swift
@@ -43,6 +43,7 @@ final class LocalOrderSynchronizer: OrderSynchronizer {
43
init(siteID: Int64, stores: StoresManager = ServiceLocator.stores) {
44
self.siteID = siteID
45
self.stores = stores
46
+ bindInputs()
47
}
48
49
// MARK: Methods
@@ -55,3 +56,13 @@ final class LocalOrderSynchronizer: OrderSynchronizer {
55
56
stores.dispatch(action)
57
58
59
+
60
+private extension LocalOrderSynchronizer {
61
+ func bindInputs() {
62
+ setStatus.withLatestFrom(orderPublisher)
63
+ .map { newStatus, order in
64
+ order.copy(status: newStatus)
65
+ }
66
+ .assign(to: &$order)
67
68
+}
0 commit comments