File tree Expand file tree Collapse file tree 3 files changed +12
-7
lines changed
Modules/Sources/Yosemite/Model/Storage
WooCommerce/Classes/ViewModels/Order Details Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,6 @@ extension Storage.Order: ReadOnlyConvertible {
8282 let orderCustomFields = customFields? . map { $0. toReadOnly ( ) } ?? [ Yosemite . MetaData] ( )
8383 let orderGiftCards = appliedGiftCards? . map { $0. toReadOnly ( ) } ?? [ Yosemite . OrderGiftCard] ( )
8484 let orderShippingLabels = shippingLabels? . map { $0. toReadOnly ( ) } ?? [ Yosemite . ShippingLabel] ( )
85- let orderShipments = shipments? . map { $0. toReadOnly ( ) } ?? [ Yosemite . WooShippingShipment] ( )
8685
8786 return Order ( siteID: siteID,
8887 orderID: orderID,
Original file line number Diff line number Diff line change 33
4423.3
55-----
6+ - [*] Order details: Display only physical items in the Shipping Labels section. [https://github.com/woocommerce/woocommerce-ios/pull/16127]
67- [internal] Address deprecated view modifiers usage following iOS17 API updates [https://github.com/woocommerce/woocommerce-ios/pull/16080]
78
8923.2
Original file line number Diff line number Diff line change @@ -1241,13 +1241,18 @@ extension OrderDetailsDataSource {
12411241 siteID: order. siteID,
12421242 orderID: order. orderID,
12431243 index: " 0 " ,
1244- items: order. items. map { item in
1245- var subItems : [ String ] = [ ]
1246- for index in 0 ..< item. quantity . intValue {
1247- subItems . append ( " \( item . itemID ) -sub- \( index ) " )
1244+ items: order. items
1245+ . filter { item in
1246+ let matchingProduct = products . first ( where : { $0 . productID == item. productOrVariationID } )
1247+ return matchingProduct ? . virtual == false
12481248 }
1249- return WooShippingShipmentItem ( id: item. itemID, subItems: subItems)
1250- } ,
1249+ . map { item in
1250+ var subItems : [ String ] = [ ]
1251+ for index in 0 ..< item. quantity. intValue {
1252+ subItems. append ( " \( item. itemID) -sub- \( index) " )
1253+ }
1254+ return WooShippingShipmentItem ( id: item. itemID, subItems: subItems)
1255+ } ,
12511256 shippingLabel: nil
12521257 ) ]
12531258 } ( )
You can’t perform that action at this time.
0 commit comments