File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
WooCommerce/Classes/ViewRelated/Orders/Order Creation/Synchronizer
Yosemite/Yosemite/Stores/Order Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ struct ShippingInputTransformer {
1111 // If input is `nil`, then we remove any existing shipping line.
1212 // We remove a shipping like by setting its `methodID` to nil.
1313 guard let input = input else {
14- let linesToRemove = order. shippingLines. map { $0 . copy ( methodID : . some ( nil ) , total : " 0 " ) }
14+ let linesToRemove = order. shippingLines. map { OrderFactory . deletedShippingLine ( $0 ) }
1515 return order. copy ( shippingTotal: " 0 " , shippingLines: linesToRemove)
1616 }
1717
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ public enum OrderFactory {
7474 /// Creates a shipping line suitable to delete a shipping line already saved remotely in an order.
7575 ///
7676 public static func deletedShippingLine( _ shippingLine: ShippingLine ) -> ShippingLine {
77- shippingLine. copy ( methodID: . some( nil ) )
77+ shippingLine. copy ( methodID: . some( nil ) , total : " 0 " )
7878 }
7979
8080 /// References a new empty order with constants `Date` values.
You can’t perform that action at this time.
0 commit comments