diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index 06a91918360..d0fa174424f 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -7,6 +7,7 @@ - [*] Jetpack setup: Native experience for the connection step [https://github.com/woocommerce/woocommerce-ios/pull/15983] - [*] 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] - [*] Order details: Always show shipping labels section if order is eligible for label creation. [https://github.com/woocommerce/woocommerce-ios/pull/16010] +- [*] Order details: Remove print buttons from shipment details [https://github.com/woocommerce/woocommerce-ios/pull/16012] 23.0 ----- diff --git a/WooCommerce/Classes/ViewModels/Order Details/OrderDetailsDataSource.swift b/WooCommerce/Classes/ViewModels/Order Details/OrderDetailsDataSource.swift index 6d9dda449d3..6a100627324 100644 --- a/WooCommerce/Classes/ViewModels/Order Details/OrderDetailsDataSource.swift +++ b/WooCommerce/Classes/ViewModels/Order Details/OrderDetailsDataSource.swift @@ -1077,12 +1077,6 @@ private extension OrderDetailsDataSource { onViewLabel: { [weak self] label in self?.onCellAction?(.openShippingLabelForm(shippingLabel: label), indexPath) }, - onPrintLabel: { [weak self] label in - self?.onCellAction?(.reprintShippingLabel(shippingLabel: label), indexPath) - }, - onPrintCustomsForm: { [weak self] url in - self?.onCellAction?(.printCustomsForm(url: url), indexPath) - }, onRefund: { [weak self] label in self?.onCellAction?(.refundShippingLabel(shippingLabel: label), indexPath) } @@ -2102,7 +2096,6 @@ extension OrderDetailsDataSource { case createShippingLabel(shipmentIndex: Int?) case openShippingLabelForm(shippingLabel: ShippingLabel) case refundShippingLabel(shippingLabel: ShippingLabel) - case printCustomsForm(url: String) case viewShipmentItems(shipment: WooShippingShipment) case shippingLabelTrackingMenu(shippingLabel: ShippingLabel, sourceView: UIView) case viewAddOns(addOns: [OrderItemProductAddOn]) diff --git a/WooCommerce/Classes/ViewModels/Order Details/OrderDetailsShipmentDetailsView.swift b/WooCommerce/Classes/ViewModels/Order Details/OrderDetailsShipmentDetailsView.swift index b4f880e55b0..277567e215c 100644 --- a/WooCommerce/Classes/ViewModels/Order Details/OrderDetailsShipmentDetailsView.swift +++ b/WooCommerce/Classes/ViewModels/Order Details/OrderDetailsShipmentDetailsView.swift @@ -9,8 +9,6 @@ struct OrderDetailsShipmentDetailsView: View { let onViewItems: () -> Void let onCreateLabel: () -> Void let onViewLabel: (ShippingLabel) -> Void - let onPrintLabel: (ShippingLabel) -> Void - let onPrintCustomsForm: (String) -> Void let onRefund: (ShippingLabel) -> Void var body: some View { @@ -29,12 +27,6 @@ struct OrderDetailsShipmentDetailsView: View { onRefund(label) } .renderedIf(label.isRefundable) - - if let url = label.commercialInvoiceURL, url.isNotEmpty { - Button(Localization.printCustomsForm) { - onPrintCustomsForm(url) - } - } } label: { Image(systemName: "ellipsis") .foregroundStyle(Color.accentColor) @@ -117,15 +109,6 @@ struct OrderDetailsShipmentDetailsView: View { } } .buttonStyle(.plain) - - Divider() - .padding(.trailing, -Layout.contentPadding) - - Button(String.localizedStringWithFormat(Localization.printShippingLabel, shipmentIndex)) { - onPrintLabel(shippingLabel) - } - .buttonStyle(SecondaryButtonStyle()) - .padding(.vertical, Layout.extraSpacing) } } } @@ -171,11 +154,6 @@ private extension OrderDetailsShipmentDetailsView { value: "Request a refund", comment: "Button to request a refund for a purchased shipping label." ) - static let printCustomsForm = NSLocalizedString( - "orderDetailsShipmentDetailsView.printCustomsForm", - value: "Print customs form", - comment: "Button to print the customs form for a purchased shipping label." - ) static let refundMessage = NSLocalizedString( "orderDetailsShipmentDetailsView.refundMessage", value: "You have successfully submitted a request for refund. " + @@ -197,12 +175,6 @@ private extension OrderDetailsShipmentDetailsView { value: "Create Shipping Label", comment: "Button to create a shipping label for a shipment" ) - static let printShippingLabel = NSLocalizedString( - "orderDetailsShipmentDetailsView.printShippingLabel", - value: "Print Shipping Label (%1$@)", - comment: "Button to print a shipping label for a shipment. Placeholder is the shipment index. " + - "Reads like: Print Shipping Label (1/2)" - ) static let trackingNumber = NSLocalizedString( "orderDetailsShipmentDetailsView.trackingNumber", value: "Tracking number", diff --git a/WooCommerce/Classes/ViewRelated/Orders/Order Details/OrderDetailsViewController.swift b/WooCommerce/Classes/ViewRelated/Orders/Order Details/OrderDetailsViewController.swift index e21ef019ad0..efb266535ea 100644 --- a/WooCommerce/Classes/ViewRelated/Orders/Order Details/OrderDetailsViewController.swift +++ b/WooCommerce/Classes/ViewRelated/Orders/Order Details/OrderDetailsViewController.swift @@ -411,8 +411,6 @@ private extension OrderDetailsViewController { showShipmentItems(shipment: shipment) case .refundShippingLabel(let shippingLabel): refundShippingLabel(shippingLabel) - case .printCustomsForm(let url): - printCustomsForm(url: url) case .shippingLabelTrackingMenu(let shippingLabel, let sourceView): shippingLabelTrackingMoreMenuTapped(shippingLabel: shippingLabel, sourceView: sourceView) case let .viewAddOns(addOns):