File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
WooCommerce/Classes/Model Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,9 @@ public struct DefaultFeatureFlagService: FeatureFlagService {
56
56
// Disabled by default to avoid costs spikes, unless in internal testing builds.
57
57
return buildConfig == . alpha
58
58
case . tapToPayOnIPhone:
59
- return buildConfig == . localDeveloper
59
+ // It is not possible to get the TTPoI entitlement for an enterprise certificate,
60
+ // so we should not enable this for alpha builds.
61
+ return buildConfig == . localDeveloper || buildConfig == . appStore
60
62
case . domainSettings:
61
63
return buildConfig == . localDeveloper || buildConfig == . alpha
62
64
case . supportRequests:
Original file line number Diff line number Diff line change @@ -70,12 +70,22 @@ extension BetaFeature {
70
70
case . inAppPurchases:
71
71
return ServiceLocator . featureFlagService. isFeatureFlagEnabled ( . inAppPurchases)
72
72
case . tapToPayOnIPhone:
73
- return ServiceLocator . featureFlagService. isFeatureFlagEnabled ( . tapToPayOnIPhone)
73
+ return ServiceLocator . featureFlagService. isFeatureFlagEnabled ( . tapToPayOnIPhone) && deviceMaySupportTTP
74
74
default :
75
75
return true
76
76
}
77
77
}
78
78
79
+ // Full checking for support of TTP requires a more complicated call.
80
+ // This is sufficient for whether the feature toggle should be shown, as full support checks
81
+ // are done when a payment is started. This is a temporary measure until full release.
82
+ private var deviceMaySupportTTP : Bool {
83
+ guard #available( iOS 16 , * ) else {
84
+ return false
85
+ }
86
+ return !UIDevice. isPad ( )
87
+ }
88
+
79
89
static var availableFeatures : [ Self ] {
80
90
allCases. filter ( \. isAvailable)
81
91
}
You can’t perform that action at this time.
0 commit comments