Skip to content

Commit 76b396b

Browse files
authored
Merge branch 'trunk' into woomob-1093-woo-poslocal-catalog-save-parsed-full-catalog-into-database
2 parents 501e954 + f374495 commit 76b396b

File tree

158 files changed

+4745
-1237
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

158 files changed

+4745
-1237
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<!--
22
Contains editorialized release notes. Raw release notes should go into `RELEASE-NOTES.txt`.
33
-->
4+
## 23.2
5+
This update smooths your WooCommerce experience with improved cash payments, easier access to POS settings, and accurate HAZMAT details on shipping labels. Plus, we fixed a Blaze flow issue so campaigns behave as expected. Faster, clearer, and more reliable — just how you need it!
6+
47
## 23.1
58
Managing your store just got smoother with a more reliable shipping label workflow! Jetpack setup has also been improved for a faster, easier connection. Update now and enjoy the improvements!
69

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ end
99
gem 'danger-dangermattic', '~> 1.2'
1010
gem 'dotenv'
1111
# 2.217.0 includes a fix for Xcode 15 test results parsing in CI
12-
gem 'fastlane', '~> 2.217'
12+
gem 'fastlane', '~> 2.228'
1313
gem 'fastlane-plugin-firebase_app_distribution', '~> 0.10'
1414
gem 'fastlane-plugin-sentry', '~> 1.0'
1515
# This comment avoids typing to switch to a development version for testing.

Gemfile.lock

Lines changed: 34 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,27 @@ GEM
2323
artifactory (3.0.17)
2424
ast (2.4.2)
2525
atomos (0.1.3)
26-
aws-eventstream (1.3.0)
27-
aws-partitions (1.1029.0)
28-
aws-sdk-core (3.214.1)
26+
aws-eventstream (1.4.0)
27+
aws-partitions (1.1154.0)
28+
aws-sdk-core (3.232.0)
2929
aws-eventstream (~> 1, >= 1.3.0)
3030
aws-partitions (~> 1, >= 1.992.0)
3131
aws-sigv4 (~> 1.9)
32+
base64
33+
bigdecimal
3234
jmespath (~> 1, >= 1.6.1)
33-
aws-sdk-kms (1.96.0)
34-
aws-sdk-core (~> 3, >= 3.210.0)
35+
logger
36+
aws-sdk-kms (1.112.0)
37+
aws-sdk-core (~> 3, >= 3.231.0)
3538
aws-sigv4 (~> 1.5)
36-
aws-sdk-s3 (1.176.1)
37-
aws-sdk-core (~> 3, >= 3.210.0)
39+
aws-sdk-s3 (1.198.0)
40+
aws-sdk-core (~> 3, >= 3.231.0)
3841
aws-sdk-kms (~> 1)
3942
aws-sigv4 (~> 1.5)
40-
aws-sigv4 (1.10.1)
43+
aws-sigv4 (1.12.1)
4144
aws-eventstream (~> 1, >= 1.0.2)
4245
babosa (1.0.4)
43-
base64 (0.2.0)
46+
base64 (0.3.0)
4447
benchmark (0.4.1)
4548
bigdecimal (3.2.2)
4649
buildkit (1.6.1)
@@ -85,7 +88,7 @@ GEM
8588
rubocop (~> 1.0)
8689
declarative (0.0.20)
8790
diffy (3.4.4)
88-
digest-crc (0.6.5)
91+
digest-crc (0.7.0)
8992
rake (>= 12.0.0, < 14.0.0)
9093
domain_name (0.6.20240107)
9194
dotenv (2.8.1)
@@ -108,12 +111,12 @@ GEM
108111
faraday (>= 0.8.0)
109112
http-cookie (~> 1.0.0)
110113
faraday-em_http (1.0.0)
111-
faraday-em_synchrony (1.0.0)
114+
faraday-em_synchrony (1.0.1)
112115
faraday-excon (1.1.0)
113116
faraday-http-cache (2.5.1)
114117
faraday (>= 0.8)
115118
faraday-httpclient (1.0.1)
116-
faraday-multipart (1.1.0)
119+
faraday-multipart (1.1.1)
117120
multipart-post (~> 2.0)
118121
faraday-net_http (1.0.2)
119122
faraday-net_http_persistent (1.2.0)
@@ -122,8 +125,8 @@ GEM
122125
faraday-retry (1.0.3)
123126
faraday_middleware (1.2.1)
124127
faraday (~> 1.0)
125-
fastimage (2.3.1)
126-
fastlane (2.226.0)
128+
fastimage (2.4.0)
129+
fastlane (2.228.0)
127130
CFPropertyList (>= 2.3, < 4.0.0)
128131
addressable (>= 2.8, < 3.0.0)
129132
artifactory (~> 3.0)
@@ -163,7 +166,7 @@ GEM
163166
tty-spinner (>= 0.8.0, < 1.0.0)
164167
word_wrap (~> 1.0.0)
165168
xcodeproj (>= 1.13.0, < 2.0.0)
166-
xcpretty (~> 0.4.0)
169+
xcpretty (~> 0.4.1)
167170
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
168171
fastlane-plugin-firebase_app_distribution (0.10.0)
169172
google-apis-firebaseappdistribution_v1 (~> 0.3.0)
@@ -213,12 +216,12 @@ GEM
213216
google-apis-core (>= 0.11.0, < 2.a)
214217
google-apis-storage_v1 (0.31.0)
215218
google-apis-core (>= 0.11.0, < 2.a)
216-
google-cloud-core (1.7.1)
219+
google-cloud-core (1.8.0)
217220
google-cloud-env (>= 1.0, < 3.a)
218221
google-cloud-errors (~> 1.0)
219222
google-cloud-env (1.6.0)
220223
faraday (>= 0.17.3, < 3.0)
221-
google-cloud-errors (1.4.0)
224+
google-cloud-errors (1.5.0)
222225
google-cloud-storage (1.47.0)
223226
addressable (~> 2.8)
224227
digest-crc (~> 0.4)
@@ -236,13 +239,14 @@ GEM
236239
highline (2.0.3)
237240
http-cookie (1.0.8)
238241
domain_name (~> 0.5)
239-
httpclient (2.8.3)
242+
httpclient (2.9.0)
243+
mutex_m
240244
i18n (1.14.7)
241245
concurrent-ruby (~> 1.0)
242246
java-properties (0.3.0)
243247
jmespath (1.6.2)
244-
json (2.9.1)
245-
jwt (2.10.1)
248+
json (2.13.2)
249+
jwt (2.10.2)
246250
base64
247251
kramdown (2.5.1)
248252
rexml (>= 3.3.9)
@@ -254,11 +258,12 @@ GEM
254258
mini_mime (1.1.5)
255259
mini_portile2 (2.8.9)
256260
minitest (5.25.5)
257-
multi_json (1.15.0)
261+
multi_json (1.17.0)
258262
multipart-post (2.4.1)
263+
mutex_m (0.3.0)
259264
nanaimo (0.4.0)
260265
nap (1.1.0)
261-
naturally (2.2.1)
266+
naturally (2.3.0)
262267
nkf (0.2.0)
263268
nokogiri (1.18.8)
264269
mini_portile2 (~> 2.8.2)
@@ -281,7 +286,7 @@ GEM
281286
highline (>= 1.6)
282287
options (~> 2.3.0)
283288
pstore (0.1.3)
284-
public_suffix (4.0.7)
289+
public_suffix (6.0.2)
285290
racc (1.8.1)
286291
rainbow (3.1.1)
287292
rake (12.3.3)
@@ -294,7 +299,7 @@ GEM
294299
trailblazer-option (>= 0.1.1, < 0.2.0)
295300
uber (< 0.2.0)
296301
retriable (3.1.2)
297-
rexml (3.4.0)
302+
rexml (3.4.2)
298303
rmagick (4.3.0)
299304
rouge (3.28.0)
300305
rubocop (1.68.0)
@@ -313,16 +318,16 @@ GEM
313318
rubocop (~> 1.0)
314319
ruby-progressbar (1.13.0)
315320
ruby2_keywords (0.0.5)
316-
rubyzip (2.3.2)
321+
rubyzip (2.4.1)
317322
sawyer (0.9.2)
318323
addressable (>= 2.3.5)
319324
faraday (>= 0.17.3, < 3)
320325
securerandom (0.4.1)
321326
security (0.1.5)
322-
signet (0.19.0)
327+
signet (0.21.0)
323328
addressable (~> 2.8)
324329
faraday (>= 0.17.5, < 3.a)
325-
jwt (>= 1.5, < 3.0)
330+
jwt (>= 1.5, < 4.0)
326331
multi_json (~> 1.10)
327332
simctl (1.6.10)
328333
CFPropertyList
@@ -352,7 +357,7 @@ GEM
352357
colored2 (~> 3.1)
353358
nanaimo (~> 0.4.0)
354359
rexml (>= 3.3.6, < 4.0)
355-
xcpretty (0.4.0)
360+
xcpretty (0.4.1)
356361
rouge (~> 3.28.0)
357362
xcpretty-travis-formatter (1.0.1)
358363
xcpretty (~> 0.2, >= 0.0.7)
@@ -366,7 +371,7 @@ PLATFORMS
366371
DEPENDENCIES
367372
danger-dangermattic (~> 1.2)
368373
dotenv
369-
fastlane (~> 2.217)
374+
fastlane (~> 2.228)
370375
fastlane-plugin-firebase_app_distribution (~> 0.10)
371376
fastlane-plugin-sentry (~> 1.0)
372377
fastlane-plugin-wpmreleasetoolkit (~> 13.3, >= 13.3.1)

Modules/Sources/Fakes/NetworkingCore.generated.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ extension NetworkingCore.OrderItem {
270270
totalTax: .fake(),
271271
attributes: .fake(),
272272
addOns: .fake(),
273+
image: .fake(),
273274
parent: .fake(),
274275
bundleConfiguration: .fake()
275276
)
@@ -455,7 +456,8 @@ extension NetworkingCore.ShippingLabel {
455456
productNames: .fake(),
456457
commercialInvoiceURL: .fake(),
457458
usedDate: .fake(),
458-
expiryDate: .fake()
459+
expiryDate: .fake(),
460+
hazmatCategory: .fake()
459461
)
460462
}
461463
}

Modules/Sources/Networking/Mapper/WooShippingConfigMapper.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ extension WooShippingConfigMapper {
4848
"config.shipments",
4949
"config.shippingLabelData.currentOrderLabels",
5050
"config.shippingLabelData.storedData.selected_destination",
51-
"config.shippingLabelData.storedData.selected_origin"
51+
"config.shippingLabelData.storedData.selected_origin",
52+
"config.shippingLabelData.storedData.selected_hazmat"
5253
].joined(separator: ", ")
5354
}

Modules/Sources/Networking/Mapper/WooShippingUpdateShipmentMapper.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ struct WooShippingUpdateShipmentMapper: Mapper {
77
///
88
func map(response: Data) throws -> WooShippingShipments {
99
let decoder = JSONDecoder()
10-
if hasDataEnvelope(in: response) {
10+
do {
1111
return try decoder.decode(WooShippingUpdateShipmentResponseEnvelope.self, from: response).data.shipments
12-
} else {
12+
} catch {
1313
return try decoder.decode(WooShippingUpdateShipmentResponse.self, from: response).shipments
1414
}
1515
}

Modules/Sources/Networking/Model/Copiable/Models+Copiable.generated.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import Codegen
55
import Foundation
66
import WooFoundation
77
import struct Alamofire.JSONEncoding
8+
import struct NetworkingCore.JetpackSite
89

910

1011
extension Networking.AIProduct {

Modules/Sources/Networking/Model/ShippingLabel/Shipments/WooShippingConfigResponse.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,13 @@ public struct WooShippingLabelData: Decodable, Equatable {
111111

112112
let destinations = storedData?.selectedDestinations
113113
let origins = storedData?.selectedOrigins
114+
let hazmatSelections = storedData?.selectedHazmat
114115

115116
if destinations?.isEmpty == false || origins?.isEmpty == false {
116117
orderLabels = WooShippingLabelData.mapAddresses(
117118
origins: origins,
118119
destinations: destinations,
120+
hazmatSelections: hazmatSelections,
119121
into: decodedOrderLabels
120122
)
121123
} else {
@@ -136,14 +138,17 @@ public struct WooShippingLabelData: Decodable, Equatable {
136138

137139
public extension WooShippingLabelData {
138140
typealias WooShippingLabelAddressMap = [String: WooShippingAddress]
141+
typealias WooShippingHazmatMap = [String: HazmatSelection]
139142

140143
struct StoredData: Decodable, Equatable {
141144
let selectedDestinations: WooShippingLabelAddressMap?
142145
let selectedOrigins: WooShippingLabelAddressMap?
146+
let selectedHazmat: WooShippingHazmatMap?
143147

144148
public enum CodingKeys: String, CodingKey {
145149
case selectedDestination = "selected_destination"
146150
case selectedOrigin = "selected_origin"
151+
case selectedHazmat = "selected_hazmat"
147152
}
148153

149154
public init(from decoder: any Decoder) throws {
@@ -156,6 +161,7 @@ public extension WooShippingLabelData {
156161
WooShippingLabelAddressMap.self,
157162
forKey: CodingKeys.selectedOrigin
158163
)
164+
selectedHazmat = try? container.decodeIfPresent(WooShippingHazmatMap.self, forKey: .selectedHazmat)
159165
}
160166
}
161167
}
@@ -166,3 +172,7 @@ enum WooShippingConfigDecodingError: Error {
166172
case missingSiteID
167173
case missingOrderID
168174
}
175+
176+
public struct HazmatSelection: Decodable, Equatable {
177+
public let category: String
178+
}

Modules/Sources/Networking/Model/ShippingLabel/Shipments/WooShippingLabelData+mapDestinations.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ extension WooShippingLabelData {
44
static func mapAddresses(
55
origins: WooShippingLabelAddressMap?,
66
destinations: WooShippingLabelAddressMap?,
7+
hazmatSelections: WooShippingHazmatMap?,
78
into labels: [ShippingLabel]
89
) -> [ShippingLabel] {
910
return labels.map { label in
@@ -14,10 +15,12 @@ extension WooShippingLabelData {
1415
let formattedID = WooShippingShipmentIDFormatter.formattedShipmentID(shipmentID)
1516
let originAddress = origins?[formattedID] ?? origins?[shipmentID]
1617
let destinationAddress = destinations?[formattedID] ?? destinations?[shipmentID]
18+
let hazmat = hazmatSelections?[formattedID] ?? hazmatSelections?[shipmentID]
1719

1820
return label.copy(
1921
originAddress: originAddress?.toShippingLabelAddress() ?? .copy,
20-
destinationAddress: destinationAddress?.toShippingLabelAddress() ?? .copy
22+
destinationAddress: destinationAddress?.toShippingLabelAddress() ?? .copy,
23+
hazmatCategory: hazmat?.category
2124
)
2225
}
2326
}

Modules/Sources/NetworkingCore/Model/Copiable/Models+Copiable.generated.swift

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,7 @@ extension NetworkingCore.OrderItem {
444444
totalTax: CopiableProp<String> = .copy,
445445
attributes: CopiableProp<[OrderItemAttribute]> = .copy,
446446
addOns: CopiableProp<[OrderItemProductAddOn]> = .copy,
447+
image: NullableCopiableProp<OrderItemProductImage> = .copy,
447448
parent: NullableCopiableProp<Int64> = .copy,
448449
bundleConfiguration: CopiableProp<[OrderItemBundleItem]> = .copy
449450
) -> NetworkingCore.OrderItem {
@@ -462,6 +463,7 @@ extension NetworkingCore.OrderItem {
462463
let totalTax = totalTax ?? self.totalTax
463464
let attributes = attributes ?? self.attributes
464465
let addOns = addOns ?? self.addOns
466+
let image = image ?? self.image
465467
let parent = parent ?? self.parent
466468
let bundleConfiguration = bundleConfiguration ?? self.bundleConfiguration
467469

@@ -481,6 +483,7 @@ extension NetworkingCore.OrderItem {
481483
totalTax: totalTax,
482484
attributes: attributes,
483485
addOns: addOns,
486+
image: image,
484487
parent: parent,
485488
bundleConfiguration: bundleConfiguration
486489
)
@@ -713,7 +716,8 @@ extension NetworkingCore.ShippingLabel {
713716
productNames: CopiableProp<[String]> = .copy,
714717
commercialInvoiceURL: NullableCopiableProp<String> = .copy,
715718
usedDate: NullableCopiableProp<Date> = .copy,
716-
expiryDate: NullableCopiableProp<Date> = .copy
719+
expiryDate: NullableCopiableProp<Date> = .copy,
720+
hazmatCategory: NullableCopiableProp<String> = .copy
717721
) -> NetworkingCore.ShippingLabel {
718722
let siteID = siteID ?? self.siteID
719723
let orderID = orderID ?? self.orderID
@@ -736,6 +740,7 @@ extension NetworkingCore.ShippingLabel {
736740
let commercialInvoiceURL = commercialInvoiceURL ?? self.commercialInvoiceURL
737741
let usedDate = usedDate ?? self.usedDate
738742
let expiryDate = expiryDate ?? self.expiryDate
743+
let hazmatCategory = hazmatCategory ?? self.hazmatCategory
739744

740745
return NetworkingCore.ShippingLabel(
741746
siteID: siteID,
@@ -758,7 +763,8 @@ extension NetworkingCore.ShippingLabel {
758763
productNames: productNames,
759764
commercialInvoiceURL: commercialInvoiceURL,
760765
usedDate: usedDate,
761-
expiryDate: expiryDate
766+
expiryDate: expiryDate,
767+
hazmatCategory: hazmatCategory
762768
)
763769
}
764770
}

0 commit comments

Comments
 (0)