Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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)
Expand Down Expand Up @@ -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)
}
}
}
Expand Down Expand Up @@ -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. " +
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down