Skip to content

Commit 7f3352f

Browse files
authored
Merge pull request #8044 from woocommerce/td/7793-remove-unused-signup-feature-flag
Remove unused `wpcomSignup` feature flag
2 parents 4f57f47 + d399c0f commit 7f3352f

File tree

3 files changed

+14
-32
lines changed

3 files changed

+14
-32
lines changed

Experiments/Experiments/DefaultFeatureFlagService.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ public struct DefaultFeatureFlagService: FeatureFlagService {
3333
return true
3434
case .searchProductsBySKU:
3535
return true
36-
case .wpcomSignup:
37-
return false
3836
case .inAppPurchases:
3937
return buildConfig == .localDeveloper || buildConfig == .alpha
4038
case .storeCreationMVP:

Experiments/Experiments/FeatureFlag.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,6 @@ public enum FeatureFlag: Int {
7070
///
7171
case searchProductsBySKU
7272

73-
/// Enables signing up for a WP.com account.
74-
///
75-
case wpcomSignup
76-
7773
/// Enables In-app purchases for buying Hosted WooCommerce plans
7874
///
7975
case inAppPurchases

WooCommerce/Classes/Authentication/AuthenticationManager.swift

Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,9 @@ class AuthenticationManager: Authentication {
4141
///
4242
private let storageManager: StorageManagerType
4343

44-
/// Whether WP.com signup is enabled in the authentication flow based on the feature flag.
45-
private let isWPComSignupEnabled: Bool
46-
4744
init(storageManager: StorageManagerType = ServiceLocator.storageManager,
4845
featureFlagService: FeatureFlagService = ServiceLocator.featureFlagService) {
4946
self.storageManager = storageManager
50-
self.isWPComSignupEnabled = featureFlagService.isFeatureFlagEnabled(.wpcomSignup)
5147
}
5248

5349
/// Initializes the WordPress Authenticator.
@@ -68,7 +64,7 @@ class AuthenticationManager: Authentication {
6864
googleLoginScheme: ApiCredentials.googleAuthScheme,
6965
userAgent: UserAgent.defaultUserAgent,
7066
showLoginOptions: true,
71-
enableSignUp: isWPComSignupEnabled,
67+
enableSignUp: false,
7268
enableSignInWithApple: true,
7369
enableSignupWithGoogle: false,
7470
enableUnifiedAuth: true,
@@ -402,27 +398,19 @@ extension AuthenticationManager: WordPressAuthenticatorDelegate {
402398
/// Presents the Signup Epilogue, in the specified NavigationController.
403399
///
404400
func presentSignupEpilogue(in navigationController: UINavigationController, for credentials: AuthenticatorCredentials, service: SocialService?) {
405-
if isWPComSignupEnabled {
406-
// A proper signup epilogue flow will be added incrementally later as part of the WP.com signup experiment:
407-
// Ref: pe5sF9-xP-p2
408-
sync(credentials: credentials) { [weak self] in
409-
self?.startStorePicker(in: navigationController)
410-
}
411-
} else {
412-
// NO-OP: The current WC version does not support Signup. Let SIWA through.
413-
guard case .apple = service else {
414-
return
415-
}
401+
// NO-OP: The current WC version does not support Signup. Let SIWA through.
402+
guard case .apple = service else {
403+
return
404+
}
416405

417-
// For SIWA, signups are treating like signing in for now.
418-
// Signup code in Authenticator normally synchronizes the auth credentials but
419-
// since we're hacking in SIWA, that's never called in the pod. Call here so the
420-
// person's name and user ID show up on the picker screen.
421-
//
422-
// This is effectively a useless screen for them other than telling them to install Jetpack.
423-
sync(credentials: credentials) { [weak self] in
424-
self?.startStorePicker(in: navigationController)
425-
}
406+
// For SIWA, signups are treating like signing in for now.
407+
// Signup code in Authenticator normally synchronizes the auth credentials but
408+
// since we're hacking in SIWA, that's never called in the pod. Call here so the
409+
// person's name and user ID show up on the picker screen.
410+
//
411+
// This is effectively a useless screen for them other than telling them to install Jetpack.
412+
sync(credentials: credentials) { [weak self] in
413+
self?.startStorePicker(in: navigationController)
426414
}
427415
}
428416

@@ -480,7 +468,7 @@ extension AuthenticationManager: WordPressAuthenticatorDelegate {
480468
/// Note: As of now, this is a NO-OP, we're not supporting any signup flows.
481469
///
482470
func shouldPresentSignupEpilogue() -> Bool {
483-
isWPComSignupEnabled
471+
false
484472
}
485473

486474
/// Synchronizes the specified WordPress Account.

0 commit comments

Comments
 (0)