Skip to content

Commit 289f043

Browse files
authored
Merge branch 'woocommerce:develop' into issue/5159-sync-productCategory-remotely
2 parents 71cd788 + a746159 commit 289f043

File tree

114 files changed

+2450
-977
lines changed

Some content is hidden

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

114 files changed

+2450
-977
lines changed

.circleci/config.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ parameters:
1515
default: false
1616

1717
xcode_version: &xcode_version
18-
xcode-version: "12.5.0"
18+
xcode-version: "13.0.0"
1919

2020
iphone_test_device: &iphone_test_device
21-
device: iPhone 11
22-
ios-version: "14.4"
21+
device: iPhone 13
22+
ios-version: "15.0"
2323

2424
ipad_test_device: &ipad_test_device
2525
device: iPad Air (4th generation)
26-
ios-version: "14.4"
26+
ios-version: "15.0"
2727

2828
commands:
2929
fix-image:
@@ -38,7 +38,7 @@ commands:
3838
echo "Manually added `/usr/local/bin` to the $PATH:"
3939
echo $PATH
4040
fi
41-
chruby ruby-2.6.6
41+
chruby ruby-$(cat .ruby-version)
4242
gem install bundler
4343
4444
# Add support for fetching SPM packages from GitHub

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.6.4
1+
2.7.4

.xcversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
12.5
1+
13.0

Experiments/Experiments/DefaultFeatureFlagService.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ public struct DefaultFeatureFlagService: FeatureFlagService {
2727
return buildConfig == .localDeveloper || buildConfig == .alpha
2828
case .filterProductsByCategory:
2929
return buildConfig == .localDeveloper || buildConfig == .alpha
30+
case .jetpackConnectionPackageSupport:
31+
return buildConfig == .localDeveloper || buildConfig == .alpha
3032
default:
3133
return true
3234
}

Experiments/Experiments/FeatureFlag.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,8 @@ public enum FeatureFlag: Int {
5353
/// Allows to filter products by a product category, persisting it so the filter can remain after restarting the app
5454
///
5555
case filterProductsByCategory
56+
57+
/// Allows sites with plugins that include Jetpack Connection Package and without Jetpack-the-plugin to connect to the app
58+
///
59+
case jetpackConnectionPackageSupport
5660
}

Fakes/Fakes/Networking.generated.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1457,7 +1457,8 @@ extension SystemPlugin {
14571457
url: .fake(),
14581458
authorName: .fake(),
14591459
authorUrl: .fake(),
1460-
networkActivated: .fake()
1460+
networkActivated: .fake(),
1461+
active: .fake()
14611462
)
14621463
}
14631464
}

Gemfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ GEM
1616
artifactory (3.0.15)
1717
atomos (0.1.3)
1818
aws-eventstream (1.2.0)
19-
aws-partitions (1.522.0)
20-
aws-sdk-core (3.121.5)
19+
aws-partitions (1.523.0)
20+
aws-sdk-core (3.121.6)
2121
aws-eventstream (~> 1, >= 1.0.2)
2222
aws-partitions (~> 1, >= 1.520.1)
2323
aws-sigv4 (~> 1.1)
@@ -155,7 +155,7 @@ GEM
155155
xcpretty (~> 0.3.0)
156156
xcpretty-travis-formatter (>= 0.0.3)
157157
fastlane-plugin-appcenter (1.11.1)
158-
fastlane-plugin-sentry (1.10.0)
158+
fastlane-plugin-sentry (1.11.0)
159159
fastlane-plugin-test_center (3.15.3)
160160
colorize
161161
json
@@ -226,7 +226,7 @@ GEM
226226
http-cookie (1.0.4)
227227
domain_name (~> 0.5)
228228
httpclient (2.8.3)
229-
i18n (1.8.10)
229+
i18n (1.8.11)
230230
concurrent-ruby (~> 1.0)
231231
jmespath (1.4.0)
232232
json (2.6.1)

Hardware/Hardware.xcodeproj/project.pbxproj

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@
4646
D88303D525E44CD200C877F9 /* MockStripeCharge.swift in Sources */ = {isa = PBXBuildFile; fileRef = D88303D425E44CD200C877F9 /* MockStripeCharge.swift */; };
4747
D88303DB25E450E700C877F9 /* PaymentIntentTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D88303DA25E450E700C877F9 /* PaymentIntentTests.swift */; };
4848
D88303DF25E4512400C877F9 /* MockStripePaymentIntent.swift in Sources */ = {isa = PBXBuildFile; fileRef = D88303DE25E4512400C877F9 /* MockStripePaymentIntent.swift */; };
49-
D88ECCD9262091CF0094398A /* CardReaderSoftwareUpdate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D88ECCD8262091CF0094398A /* CardReaderSoftwareUpdate.swift */; };
50-
D88ECCDF2620933D0094398A /* CardReaderSofware+Stripe.swift in Sources */ = {isa = PBXBuildFile; fileRef = D88ECCDE2620933D0094398A /* CardReaderSofware+Stripe.swift */; };
5149
D88ECCE3262095A10094398A /* UpdateTimeEstimate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D88ECCE2262095A10094398A /* UpdateTimeEstimate.swift */; };
5250
D88ECCE7262096BD0094398A /* UpdateTimeEstimate+Stripe.swift in Sources */ = {isa = PBXBuildFile; fileRef = D88ECCE6262096BD0094398A /* UpdateTimeEstimate+Stripe.swift */; };
5351
D88FDB0925DD216B00CB0DBD /* Hardware.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D88FDAFF25DD216B00CB0DBD /* Hardware.framework */; };
@@ -90,6 +88,9 @@
9088
E1CFC1662643EAA30089F86F /* SampleContent.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1CFC1652643EAA30089F86F /* SampleContent.swift */; };
9189
E1CFC16D2643EBCB0089F86F /* Hardware.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D88FDAFF25DD216B00CB0DBD /* Hardware.framework */; };
9290
E1CFC16E2643EBCB0089F86F /* Hardware.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D88FDAFF25DD216B00CB0DBD /* Hardware.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
91+
E1E125AC26EB582B0068A9B0 /* CardReaderSoftwareUpdateState.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1E125AB26EB582B0068A9B0 /* CardReaderSoftwareUpdateState.swift */; };
92+
E1E125AE26EB66B30068A9B0 /* FallibleCancelable.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1E125AD26EB66B30068A9B0 /* FallibleCancelable.swift */; };
93+
E1E125B026EB66EA0068A9B0 /* Cancelable+Stripe.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1E125AF26EB66EA0068A9B0 /* Cancelable+Stripe.swift */; };
9394
E1E4FA2F2653CFD5007B9D4F /* PrintingResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1E4FA2E2653CFD5007B9D4F /* PrintingResult.swift */; };
9495
/* End PBXBuildFile section */
9596

@@ -172,8 +173,6 @@
172173
D88303D425E44CD200C877F9 /* MockStripeCharge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockStripeCharge.swift; sourceTree = "<group>"; };
173174
D88303DA25E450E700C877F9 /* PaymentIntentTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaymentIntentTests.swift; sourceTree = "<group>"; };
174175
D88303DE25E4512400C877F9 /* MockStripePaymentIntent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockStripePaymentIntent.swift; sourceTree = "<group>"; };
175-
D88ECCD8262091CF0094398A /* CardReaderSoftwareUpdate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardReaderSoftwareUpdate.swift; sourceTree = "<group>"; };
176-
D88ECCDE2620933D0094398A /* CardReaderSofware+Stripe.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CardReaderSofware+Stripe.swift"; sourceTree = "<group>"; };
177176
D88ECCE2262095A10094398A /* UpdateTimeEstimate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UpdateTimeEstimate.swift; sourceTree = "<group>"; };
178177
D88ECCE6262096BD0094398A /* UpdateTimeEstimate+Stripe.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UpdateTimeEstimate+Stripe.swift"; sourceTree = "<group>"; };
179178
D88FDAFF25DD216B00CB0DBD /* Hardware.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Hardware.framework; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -221,6 +220,9 @@
221220
E1CFC14F2643E9EE0089F86F /* ReceiptSettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReceiptSettingsView.swift; sourceTree = "<group>"; };
222221
E1CFC1562643E9EE0089F86F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
223222
E1CFC1652643EAA30089F86F /* SampleContent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SampleContent.swift; sourceTree = "<group>"; };
223+
E1E125AB26EB582B0068A9B0 /* CardReaderSoftwareUpdateState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardReaderSoftwareUpdateState.swift; sourceTree = "<group>"; };
224+
E1E125AD26EB66B30068A9B0 /* FallibleCancelable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FallibleCancelable.swift; sourceTree = "<group>"; };
225+
E1E125AF26EB66EA0068A9B0 /* Cancelable+Stripe.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Cancelable+Stripe.swift"; sourceTree = "<group>"; };
224226
E1E4FA2E2653CFD5007B9D4F /* PrintingResult.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PrintingResult.swift; sourceTree = "<group>"; };
225227
E9F0AC202B287C1221EA2C99 /* Pods_Hardware.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Hardware.framework; sourceTree = BUILT_PRODUCTS_DIR; };
226228
F45592A33DEE569C9775EEE7 /* Pods-PrinterPlayground.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PrinterPlayground.release.xcconfig"; path = "Target Support Files/Pods-PrinterPlayground/Pods-PrinterPlayground.release.xcconfig"; sourceTree = "<group>"; };
@@ -379,6 +381,7 @@
379381
D89B8F0725DDC8F60001C726 /* Charge.swift */,
380382
D89B8F0B25DDC9D30001C726 /* ChargeStatus.swift */,
381383
D88FDB2525DD21B000CB0DBD /* PaymentIntent.swift */,
384+
E1E125AD26EB66B30068A9B0 /* FallibleCancelable.swift */,
382385
D89B8F0125DDC7500001C726 /* PaymentIntentStatus.swift */,
383386
D88FDB2325DD21B000CB0DBD /* PaymentIntentParameters.swift */,
384387
D88FDB2025DD21AF00CB0DBD /* PaymentStatus.swift */,
@@ -390,7 +393,7 @@
390393
D845BDB7262D97B300A3E40F /* ReceiptDetails.swift */,
391394
D80B4659260E1E160092EDC0 /* StatementDescriptor.swift */,
392395
D88ECCE2262095A10094398A /* UpdateTimeEstimate.swift */,
393-
D88ECCD8262091CF0094398A /* CardReaderSoftwareUpdate.swift */,
396+
E1E125AB26EB582B0068A9B0 /* CardReaderSoftwareUpdateState.swift */,
394397
D845BDC1262D98C400A3E40F /* CardBrand.swift */,
395398
D845BDD9262DAADB00A3E40F /* PaymentMethod.swift */,
396399
);
@@ -414,10 +417,10 @@
414417
D88FDB3825DD21D300CB0DBD /* DefaultConnectionTokenProvider.swift */,
415418
D81AE85925E6A62800D9CFD3 /* StripeCardReaderDiscoveryCache.swift */,
416419
D854FC21260A34B000A219CD /* UnderlyingError+Stripe.swift */,
417-
D88ECCDE2620933D0094398A /* CardReaderSofware+Stripe.swift */,
418420
D88ECCE6262096BD0094398A /* UpdateTimeEstimate+Stripe.swift */,
419421
D845BDCF262D9C6C00A3E40F /* ReceiptDetails+Stripe.swift */,
420422
D845BDDD262DAB8300A3E40F /* PaymentMethod+Stripe.swift */,
423+
E1E125AF26EB66EA0068A9B0 /* Cancelable+Stripe.swift */,
421424
);
422425
path = StripeCardReader;
423426
sourceTree = "<group>";
@@ -740,10 +743,12 @@
740743
D845BDDE262DAB8300A3E40F /* PaymentMethod+Stripe.swift in Sources */,
741744
D89B8F0C25DDC9D30001C726 /* ChargeStatus.swift in Sources */,
742745
E140F61C2668CDC900FDB5FF /* Logging.swift in Sources */,
746+
E1E125AC26EB582B0068A9B0 /* CardReaderSoftwareUpdateState.swift in Sources */,
743747
D88FDB3125DD21B000CB0DBD /* CardReader.swift in Sources */,
744748
D845BDDA262DAADB00A3E40F /* PaymentMethod.swift in Sources */,
745749
D81AE85A25E6A62800D9CFD3 /* StripeCardReaderDiscoveryCache.swift in Sources */,
746750
D865C61E261CE001006717B8 /* CardReaderEvent+Stripe.swift in Sources */,
751+
E1E125B026EB66EA0068A9B0 /* Cancelable+Stripe.swift in Sources */,
747752
D80B4656260E1B290092EDC0 /* CurrencyCode.swift in Sources */,
748753
D81AE86425E6B77F00D9CFD3 /* CardReaderServiceError.swift in Sources */,
749754
D8DF5F4E25DD9F91008AFE25 /* CardReaderType+Stripe.swift in Sources */,
@@ -759,7 +764,6 @@
759764
D80B464E260E18930092EDC0 /* Email.swift in Sources */,
760765
D89B8F0225DDC7500001C726 /* PaymentIntentStatus.swift in Sources */,
761766
D8652E2A2630520300350F37 /* CardPresentReceiptParameters.swift in Sources */,
762-
D88ECCD9262091CF0094398A /* CardReaderSoftwareUpdate.swift in Sources */,
763767
D89B8F1E25DDCD3D0001C726 /* PaymentIntent+Stripe.swift in Sources */,
764768
D89B8F1625DDCC810001C726 /* ChargeStatus+Stripe.swift in Sources */,
765769
030338102705F7D400764131 /* ReceiptTotalLine.swift in Sources */,
@@ -777,8 +781,8 @@
777781
D88FDB3025DD21B000CB0DBD /* CardReaderService.swift in Sources */,
778782
D88FDB2C25DD21B000CB0DBD /* CardReaderStatus.swift in Sources */,
779783
D89B8F2425DDCD800001C726 /* PaymentIntentStatus+Stripe.swift in Sources */,
784+
E1E125AE26EB66B30068A9B0 /* FallibleCancelable.swift in Sources */,
780785
D88FDB3A25DD21D300CB0DBD /* DefaultConnectionTokenProvider.swift in Sources */,
781-
D88ECCDF2620933D0094398A /* CardReaderSofware+Stripe.swift in Sources */,
782786
);
783787
runOnlyForDeploymentPostprocessing = 0;
784788
};

Hardware/Hardware/CardReader/CardReader.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ public struct CardReader {
2424

2525
/// The type of card reader
2626
public let readerType: CardReaderType
27+
28+
/// The CardReader location id
29+
public let locationId: String?
2730
}
2831

2932

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
/// Abstraction provided by Hardware so that clients of this library
22
/// can model a way to provide a connection token.
33
/// It is meant to abstract an implementation of the [adapter pattern](https://en.wikipedia.org/wiki/Adapter_pattern)
4-
public protocol CardReaderConfigProvider {
4+
5+
public protocol ReaderTokenProvider {
56
func fetchToken(completion: @escaping(String?, Error?) -> Void)
67
}
8+
9+
public protocol ReaderLocationProvider {
10+
func fetchDefaultLocationID(completion: @escaping(String?, Error?) -> Void)
11+
}
12+
13+
public protocol CardReaderConfigProvider: ReaderLocationProvider {
14+
func fetchToken(completion: @escaping(String?, Error?) -> Void)
15+
func fetchDefaultLocationID(completion: @escaping(String?, Error?) -> Void)
16+
}

0 commit comments

Comments
 (0)