Skip to content

Commit 1573804

Browse files
committed
Merge branch 'trunk' into task/wcios17-updates-to-onchange-v1
# Conflicts: # WooCommerce/Classes/POS/Presentation/Reusable Views/POSModalViewModifier.swift # WooCommerce/Classes/POS/Presentation/Reusable Views/POSSheet.swift
2 parents 8f6b925 + 92fde87 commit 1573804

File tree

360 files changed

+12921
-17896
lines changed

Some content is hidden

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

360 files changed

+12921
-17896
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.1
5+
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!
6+
47
## 23.0
58
Faster performance and smoother experience! This update brings improved product loading, better tax calculations, and enhanced address lookup with map support. We've added guided barcode scanning for POS users and strengthened shipping requirements for EU destinations. Plus, we've fixed stability issues for a more reliable experience.
69

Modules/Package.resolved

Lines changed: 10 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Modules/Package.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ let package = Package(
66
name: "Modules",
77
platforms: [
88
// Keep in sync with Common.xcconfig
9-
.iOS(.v16),
9+
.iOS(.v17),
1010
.macOS(.v10_14),
1111
.watchOS(.v9),
1212
],
@@ -83,6 +83,7 @@ let package = Package(
8383
.package(url: "https://github.com/envoy/Embassy", from: "4.1.2"),
8484
// FIXME: This should be available via Tracks, but Tracks does not compile for watchOS
8585
.package(url: "https://github.com/getsentry/sentry-cocoa", from: "8.46.0"),
86+
.package(url: "https://github.com/groue/GRDB.swift", from: "7.0.0"),
8687
.package(url: "https://github.com/jonreid/ViewControllerPresentationSpy", from: "7.0.0"),
8788
.package(url: "https://github.com/kishikawakatsumi/KeychainAccess", from: "4.2.2"),
8889
.package(url: "https://github.com/krzysztofzablocki/Difference.git", branch: "master"),
@@ -159,7 +160,8 @@ let package = Package(
159160
name: "Storage",
160161
dependencies: [
161162
"Codegen",
162-
"WooFoundation"
163+
"WooFoundation",
164+
.product(name: "GRDB", package: "GRDB.swift")
163165
],
164166
exclude: ["Model/Migrations.md"],
165167
resources: [.process("Resources")]

Modules/Sources/Experiments/DefaultFeatureFlagService.swift

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,23 +88,22 @@ public struct DefaultFeatureFlagService: FeatureFlagService {
8888
return true
8989
case .productImageOptimizedHandling:
9090
return true
91-
case .pointOfSaleBarcodeScanningi1:
92-
return true
93-
case .showPointOfSaleBarcodeSimulator:
94-
// Enables a simulated barcode scanner in dev builds for testing. Do not ship this one!
95-
return false
96-
case .pointOfSaleAsATabi1:
97-
return true
9891
case .pointOfSaleAsATabi2:
9992
return true
10093
case .pointOfSaleOrdersi1:
10194
return true
10295
case .pointOfSaleOrdersi2:
10396
return true
104-
case .pointOfSaleBarcodeScanningi2:
97+
case .pointOfSaleSettingsi1:
10598
return true
10699
case .orderAddressMapSearch:
107100
return true
101+
case .pointOfSaleHistoricalOrdersi1:
102+
return buildConfig == .localDeveloper || buildConfig == .alpha
103+
case .applicationPasswordExperiment:
104+
return buildConfig == .localDeveloper || buildConfig == .alpha
105+
case .pointOfSaleLocalCatalogi1:
106+
return buildConfig == .localDeveloper || buildConfig == .alpha
108107
default:
109108
return true
110109
}

Modules/Sources/Experiments/FeatureFlag.swift

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -183,18 +183,6 @@ public enum FeatureFlag: Int {
183183
///
184184
case pointOfSaleReceipts
185185

186-
/// Enables barcode scanning with an external scanner in POS
187-
///
188-
case pointOfSaleBarcodeScanningi1
189-
190-
/// Enables a simulated barcode scanner for testing in POS. Do not ship this one!
191-
///
192-
case showPointOfSaleBarcodeSimulator
193-
194-
/// Enables displaying POS as a tab in the tab bar with the same eligibility as the previous entry point
195-
///
196-
case pointOfSaleAsATabi1
197-
198186
/// Enables displaying POS as a tab in the tab bar for stores in eligible countries
199187
///
200188
case pointOfSaleAsATabi2
@@ -207,11 +195,24 @@ public enum FeatureFlag: Int {
207195
///
208196
case pointOfSaleOrdersi2
209197

210-
/// Enables the Point of Sale Barcode Scanner set up flows, as part of i2
198+
/// Enables the entry point for Point of Sale Settings
211199
///
212-
case pointOfSaleBarcodeScanningi2
200+
case pointOfSaleSettingsi1
213201

214202
/// Enables the CTA to search for an address in the map in order details > shipping address.
215203
///
216204
case orderAddressMapSearch
205+
206+
/// Enables the entry point for Point of Sale Orders
207+
///
208+
case pointOfSaleHistoricalOrdersi1
209+
210+
/// Enables switching Jetpack requests to use application password
211+
///
212+
case applicationPasswordExperiment
213+
214+
/// Enables Local Catalog i1 in Point of Sale.
215+
/// It syncs products and variations to local storage and display them in POS for quick access.
216+
///
217+
case pointOfSaleLocalCatalogi1
217218
}

Modules/Sources/Fakes/Networking.generated.swift

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -753,12 +753,11 @@ extension Networking.POSProduct {
753753
productID: .fake(),
754754
name: .fake(),
755755
productTypeKey: .fake(),
756+
fullDescription: .fake(),
757+
shortDescription: .fake(),
756758
sku: .fake(),
757759
globalUniqueID: .fake(),
758760
price: .fake(),
759-
regularPrice: .fake(),
760-
salePrice: .fake(),
761-
onSale: .fake(),
762761
downloadable: .fake(),
763762
parentID: .fake(),
764763
images: .fake(),
@@ -779,12 +778,10 @@ extension Networking.POSProductVariation {
779778
productVariationID: .fake(),
780779
attributes: .fake(),
781780
image: .fake(),
781+
fullDescription: .fake(),
782782
sku: .fake(),
783783
globalUniqueID: .fake(),
784784
price: .fake(),
785-
regularPrice: .fake(),
786-
salePrice: .fake(),
787-
onSale: .fake(),
788785
downloadable: .fake(),
789786
manageStock: .fake(),
790787
stockQuantity: .fake(),
@@ -1776,7 +1773,8 @@ extension Networking.Site {
17761773
canBlaze: .fake(),
17771774
isAdmin: .fake(),
17781775
wasEcommerceTrial: .fake(),
1779-
hasSSOEnabled: .fake()
1776+
hasSSOEnabled: .fake(),
1777+
applicationPasswordAvailable: .fake()
17801778
)
17811779
}
17821780
}
@@ -1786,7 +1784,8 @@ extension Networking.SiteAPI {
17861784
public static func fake() -> Networking.SiteAPI {
17871785
.init(
17881786
siteID: .fake(),
1789-
namespaces: .fake()
1787+
namespaces: .fake(),
1788+
applicationPasswordAvailable: .fake()
17901789
)
17911790
}
17921791
}
@@ -2014,22 +2013,6 @@ extension Networking.UploadableMedia {
20142013
)
20152014
}
20162015
}
2017-
extension Networking.User {
2018-
/// Returns a "ready to use" type filled with fake values.
2019-
///
2020-
public static func fake() -> Networking.User {
2021-
.init(
2022-
localID: .fake(),
2023-
siteID: .fake(),
2024-
email: .fake(),
2025-
username: .fake(),
2026-
firstName: .fake(),
2027-
lastName: .fake(),
2028-
nickname: .fake(),
2029-
roles: .fake()
2030-
)
2031-
}
2032-
}
20332016
extension Networking.WCAnalyticsCustomer {
20342017
/// Returns a "ready to use" type filled with fake values.
20352018
///

Modules/Sources/Fakes/NetworkingCore.generated.swift

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,3 +575,19 @@ extension NetworkingCore.StatsGranularityV4 {
575575
.hourly
576576
}
577577
}
578+
extension NetworkingCore.User {
579+
/// Returns a "ready to use" type filled with fake values.
580+
///
581+
public static func fake() -> NetworkingCore.User {
582+
.init(
583+
localID: .fake(),
584+
siteID: .fake(),
585+
email: .fake(),
586+
username: .fake(),
587+
firstName: .fake(),
588+
lastName: .fake(),
589+
nickname: .fake(),
590+
roles: .fake()
591+
)
592+
}
593+
}

Modules/Sources/Hardware/CardReader/StripeCardReader/StripeCardReaderService.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1109,7 +1109,7 @@ private extension StripeCardReaderService {
11091109
DDLogError("💳 Card Reader Config Error: \(error)")
11101110
default:
11111111
let errorCode = ErrorCode(_nsError: error as NSError)
1112-
DDLogError("💳 Stripe Error Code: \(errorCode.code)")
1112+
DDLogError("💳 Stripe Error Code: \(errorCode.errorCode)")
11131113
}
11141114
return UnderlyingError(with: error)
11151115
}

Modules/Sources/Networking/Mapper/JetpackConnectionProvisionMapper.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,11 @@ public struct JetpackConnectionProvisionResponse: Decodable {
1818
public let userId: Int64
1919
public let scope: String
2020
public let secret: String
21+
22+
/// periphery: ignore - used in test module
23+
public init(userId: Int64, scope: String, secret: String) {
24+
self.userId = userId
25+
self.scope = scope
26+
self.secret = secret
27+
}
2128
}

0 commit comments

Comments
 (0)