Skip to content

Commit 5512e0d

Browse files
authored
Order Details: Remove Print buttons from shipment details (#16012)
2 parents 3f10674 + 2948ae6 commit 5512e0d

File tree

4 files changed

+1
-37
lines changed

4 files changed

+1
-37
lines changed

RELEASE-NOTES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- [*] Payments: Updated the In-Person Payments `Learn More` redirection to display the correct page based on the selected payment provider [https://github.com/woocommerce/woocommerce-ios/pull/15998]
99
- [*] Add "POS" label in Most recent orders in My store dashboard [https://github.com/woocommerce/woocommerce-ios/pull/16006]
1010
- [*] Order details: Always show shipping labels section if order is eligible for label creation. [https://github.com/woocommerce/woocommerce-ios/pull/16010]
11+
- [*] Order details: Remove print buttons from shipment details [https://github.com/woocommerce/woocommerce-ios/pull/16012]
1112

1213
23.0
1314
-----

WooCommerce/Classes/ViewModels/Order Details/OrderDetailsDataSource.swift

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,12 +1077,6 @@ private extension OrderDetailsDataSource {
10771077
onViewLabel: { [weak self] label in
10781078
self?.onCellAction?(.openShippingLabelForm(shippingLabel: label), indexPath)
10791079
},
1080-
onPrintLabel: { [weak self] label in
1081-
self?.onCellAction?(.reprintShippingLabel(shippingLabel: label), indexPath)
1082-
},
1083-
onPrintCustomsForm: { [weak self] url in
1084-
self?.onCellAction?(.printCustomsForm(url: url), indexPath)
1085-
},
10861080
onRefund: { [weak self] label in
10871081
self?.onCellAction?(.refundShippingLabel(shippingLabel: label), indexPath)
10881082
}
@@ -2104,7 +2098,6 @@ extension OrderDetailsDataSource {
21042098
case createShippingLabel(shipmentIndex: Int?)
21052099
case openShippingLabelForm(shippingLabel: ShippingLabel)
21062100
case refundShippingLabel(shippingLabel: ShippingLabel)
2107-
case printCustomsForm(url: String)
21082101
case viewShipmentItems(shipment: WooShippingShipment)
21092102
case shippingLabelTrackingMenu(shippingLabel: ShippingLabel, sourceView: UIView)
21102103
case viewAddOns(addOns: [OrderItemProductAddOn])

WooCommerce/Classes/ViewModels/Order Details/OrderDetailsShipmentDetailsView.swift

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ struct OrderDetailsShipmentDetailsView: View {
99
let onViewItems: () -> Void
1010
let onCreateLabel: () -> Void
1111
let onViewLabel: (ShippingLabel) -> Void
12-
let onPrintLabel: (ShippingLabel) -> Void
13-
let onPrintCustomsForm: (String) -> Void
1412
let onRefund: (ShippingLabel) -> Void
1513

1614
var body: some View {
@@ -29,12 +27,6 @@ struct OrderDetailsShipmentDetailsView: View {
2927
onRefund(label)
3028
}
3129
.renderedIf(label.isRefundable)
32-
33-
if let url = label.commercialInvoiceURL, url.isNotEmpty {
34-
Button(Localization.printCustomsForm) {
35-
onPrintCustomsForm(url)
36-
}
37-
}
3830
} label: {
3931
Image(systemName: "ellipsis")
4032
.foregroundStyle(Color.accentColor)
@@ -117,15 +109,6 @@ struct OrderDetailsShipmentDetailsView: View {
117109
}
118110
}
119111
.buttonStyle(.plain)
120-
121-
Divider()
122-
.padding(.trailing, -Layout.contentPadding)
123-
124-
Button(String.localizedStringWithFormat(Localization.printShippingLabel, shipmentIndex)) {
125-
onPrintLabel(shippingLabel)
126-
}
127-
.buttonStyle(SecondaryButtonStyle())
128-
.padding(.vertical, Layout.extraSpacing)
129112
}
130113
}
131114
}
@@ -171,11 +154,6 @@ private extension OrderDetailsShipmentDetailsView {
171154
value: "Request a refund",
172155
comment: "Button to request a refund for a purchased shipping label."
173156
)
174-
static let printCustomsForm = NSLocalizedString(
175-
"orderDetailsShipmentDetailsView.printCustomsForm",
176-
value: "Print customs form",
177-
comment: "Button to print the customs form for a purchased shipping label."
178-
)
179157
static let refundMessage = NSLocalizedString(
180158
"orderDetailsShipmentDetailsView.refundMessage",
181159
value: "You have successfully submitted a request for refund. " +
@@ -197,12 +175,6 @@ private extension OrderDetailsShipmentDetailsView {
197175
value: "Create Shipping Label",
198176
comment: "Button to create a shipping label for a shipment"
199177
)
200-
static let printShippingLabel = NSLocalizedString(
201-
"orderDetailsShipmentDetailsView.printShippingLabel",
202-
value: "Print Shipping Label (%1$@)",
203-
comment: "Button to print a shipping label for a shipment. Placeholder is the shipment index. " +
204-
"Reads like: Print Shipping Label (1/2)"
205-
)
206178
static let trackingNumber = NSLocalizedString(
207179
"orderDetailsShipmentDetailsView.trackingNumber",
208180
value: "Tracking number",

WooCommerce/Classes/ViewRelated/Orders/Order Details/OrderDetailsViewController.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,6 @@ private extension OrderDetailsViewController {
411411
showShipmentItems(shipment: shipment)
412412
case .refundShippingLabel(let shippingLabel):
413413
refundShippingLabel(shippingLabel)
414-
case .printCustomsForm(let url):
415-
printCustomsForm(url: url)
416414
case .shippingLabelTrackingMenu(let shippingLabel, let sourceView):
417415
shippingLabelTrackingMoreMenuTapped(shippingLabel: shippingLabel, sourceView: sourceView)
418416
case let .viewAddOns(addOns):

0 commit comments

Comments
 (0)