Skip to content

Commit bc3655a

Browse files
committed
Remove unused code
1 parent cd01163 commit bc3655a

File tree

5 files changed

+1
-37
lines changed

5 files changed

+1
-37
lines changed

Modules/Sources/NetworkingCore/Model/OrderItem.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,11 +240,9 @@ private struct OrderItemProductAddOnContainer: Decodable {
240240
// MARK: - Order Item Product Image
241241
//
242242
public struct OrderItemProductImage: Codable, Equatable, Hashable, Sendable {
243-
public let id: String
244243
public let src: String
245244

246-
public init(id: String, src: String) {
247-
self.id = id
245+
public init(src: String) {
248246
self.src = src
249247
}
250248
}

Modules/Sources/Yosemite/PointOfSale/OrderList/POSOrderItem.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ import Foundation
33
public struct POSOrderItem: Equatable, Hashable {
44
public let itemID: Int64
55
public let name: String
6-
// periphery:ignore - Will be used for images
7-
public let productID: Int64
8-
// periphery:ignore - Will be used for images
9-
public let variationID: Int64
106
public let quantity: Decimal
117
public let formattedPrice: String
128
public let formattedTotal: String
@@ -15,17 +11,13 @@ public struct POSOrderItem: Equatable, Hashable {
1511

1612
public init(itemID: Int64,
1713
name: String,
18-
productID: Int64,
19-
variationID: Int64,
2014
quantity: Decimal,
2115
formattedPrice: String,
2216
formattedTotal: String,
2317
imageSrc: String?,
2418
attributes: [OrderItemAttribute]) {
2519
self.itemID = itemID
2620
self.name = name
27-
self.productID = productID
28-
self.variationID = variationID
2921
self.quantity = quantity
3022
self.formattedPrice = formattedPrice
3123
self.formattedTotal = formattedTotal

Modules/Sources/Yosemite/PointOfSale/OrderList/POSOrderMapper.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ struct POSOrderMapper {
5656
return POSOrderItem(
5757
itemID: orderItem.itemID,
5858
name: orderItem.name,
59-
productID: orderItem.productID,
60-
variationID: orderItem.variationID,
6159
quantity: orderItem.quantity,
6260
formattedPrice: currencyFormatter.formatAmount(orderItem.price, with: currency) ?? "",
6361
formattedTotal: currencyFormatter.formatAmount(orderItem.total, with: currency) ?? "",

WooCommerce/Classes/POS/Utils/PreviewHelpers.swift

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,6 @@ struct POSPreviewHelpers {
255255
lineItems: [
256256
POSOrderItem(itemID: 1,
257257
name: "Premium Coffee Beans",
258-
productID: 101,
259-
variationID: 0,
260258
quantity: 2.0,
261259
formattedPrice: "$12.50",
262260
formattedTotal: "$25.00",
@@ -265,8 +263,6 @@ struct POSPreviewHelpers {
265263
POSOrderItem(
266264
itemID: 2,
267265
name: "Organic Tea - Earl Grey",
268-
productID: 102,
269-
variationID: 203,
270266
quantity: 1.0,
271267
formattedPrice: "$15.99",
272268
formattedTotal: "$15.99",
@@ -303,8 +299,6 @@ final class PointOfSalePreviewOrderListController: PointOfSaleOrderListControlle
303299
lineItems: [
304300
POSOrderItem(itemID: 1,
305301
name: "Premium Coffee Beans",
306-
productID: 101,
307-
variationID: 0,
308302
quantity: 2.0,
309303
formattedPrice: "$12.50",
310304
formattedTotal: "$25.00",
@@ -313,8 +307,6 @@ final class PointOfSalePreviewOrderListController: PointOfSaleOrderListControlle
313307
POSOrderItem(
314308
itemID: 2,
315309
name: "Organic Tea - Earl Grey",
316-
productID: 102,
317-
variationID: 203,
318310
quantity: 1.0,
319311
formattedPrice: "$15.99",
320312
formattedTotal: "$15.99",
@@ -345,8 +337,6 @@ final class PointOfSalePreviewOrderListController: PointOfSaleOrderListControlle
345337
POSOrderItem(
346338
itemID: 3,
347339
name: "Artisan Chocolate Box",
348-
productID: 103,
349-
variationID: 0,
350340
quantity: 3.0,
351341
formattedPrice: "$19.99",
352342
formattedTotal: "$59.97",
@@ -356,8 +346,6 @@ final class PointOfSalePreviewOrderListController: PointOfSaleOrderListControlle
356346
POSOrderItem(
357347
itemID: 4,
358348
name: "Gourmet Cookie Set - Mixed",
359-
productID: 104,
360-
variationID: 401,
361349
quantity: 1.0,
362350
formattedPrice: "$29.99",
363351
formattedTotal: "$29.99",

WooCommerce/WooCommerceTests/POS/Mocks/MockPointOfSaleOrderListService.swift

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,6 @@ extension MockPointOfSaleOrderListService {
8080
POSOrderItem(
8181
itemID: 1,
8282
name: "Coffee",
83-
productID: 101,
84-
variationID: 0,
8583
quantity: 2,
8684
formattedPrice: "$10.00",
8785
formattedTotal: "$20.00",
@@ -91,8 +89,6 @@ extension MockPointOfSaleOrderListService {
9189
POSOrderItem(
9290
itemID: 2,
9391
name: "Muffin",
94-
productID: 102,
95-
variationID: 0,
9692
quantity: 1,
9793
formattedPrice: "$5.99",
9894
formattedTotal: "$5.99",
@@ -121,8 +117,6 @@ extension MockPointOfSaleOrderListService {
121117
POSOrderItem(
122118
itemID: 3,
123119
name: "Tea",
124-
productID: 103,
125-
variationID: 0,
126120
quantity: 1,
127121
formattedPrice: "$15.50",
128122
formattedTotal: "$15.50",
@@ -157,8 +151,6 @@ extension MockPointOfSaleOrderListService {
157151
POSOrderItem(
158152
itemID: 4,
159153
name: "Sandwich",
160-
productID: 104,
161-
variationID: 0,
162154
quantity: 1,
163155
formattedPrice: "$12.00",
164156
formattedTotal: "$12.00",
@@ -168,8 +160,6 @@ extension MockPointOfSaleOrderListService {
168160
POSOrderItem(
169161
itemID: 5,
170162
name: "Soup",
171-
productID: 105,
172-
variationID: 0,
173163
quantity: 2,
174164
formattedPrice: "$15.38",
175165
formattedTotal: "$30.75",
@@ -198,8 +188,6 @@ extension MockPointOfSaleOrderListService {
198188
POSOrderItem(
199189
itemID: 6,
200190
name: "Cookies",
201-
productID: 106,
202-
variationID: 0,
203191
quantity: 1,
204192
formattedPrice: "$12.00",
205193
formattedTotal: "$12.00",

0 commit comments

Comments
 (0)