Skip to content

Commit 8ff603e

Browse files
Merge pull request #8533 from woocommerce/feat/8514-conclude-native-jetpack-install
Conclude native Jetpack install experiment
2 parents 5a0b846 + 07fd62c commit 8ff603e

File tree

3 files changed

+6
-53
lines changed

3 files changed

+6
-53
lines changed

Experiments/Experiments/ABTest.swift

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@ public enum ABTest: String, CaseIterable {
1515
/// Experiment ref: pbxNRc-1S0-p2
1616
case aaTestLoggedOut = "woocommerceios_explat_aa_test_logged_out_202212_v2"
1717

18-
/// A/B test to measure the sign-in success rate when native Jetpack installation experience is enabled
19-
/// Experiment ref: pbxNRc-29W-p2
20-
///
21-
case nativeJetpackSetupFlow = "woocommerceios_login_jetpack_setup_flow_v2"
22-
2318
/// Returns a variation for the given experiment
2419
public var variation: Variation {
2520
ExPlat.shared?.experiment(rawValue) ?? .control
@@ -30,7 +25,7 @@ public enum ABTest: String, CaseIterable {
3025
/// When adding a new experiment, add it to the appropriate case depending on its context (logged-in or logged-out experience).
3126
public var context: ExperimentContext {
3227
switch self {
33-
case .aaTestLoggedIn, .nativeJetpackSetupFlow:
28+
case .aaTestLoggedIn:
3429
return .loggedIn
3530
case .aaTestLoggedOut:
3631
return .loggedOut

RELEASE-NOTES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
-----
55
- [*] Design refresh: Buttons, links, and other calls to action are now purple instead of pink. [https://github.com/woocommerce/woocommerce-ios/pull/8451]
66
- [internal] Design: Updated capitalization for various pages, links, and buttons to match new design guidelines. [https://github.com/woocommerce/woocommerce-ios/pull/8455]
7+
- [internal] Remove A/B testing and release native Jetpack installation flow for all users. [https://github.com/woocommerce/woocommerce-ios/pull/8533]
78

89
11.7
910
-----

WooCommerce/Classes/Authentication/AuthenticationManager.swift

Lines changed: 4 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ class AuthenticationManager: Authentication {
6262
let isWPComMagicLinkPreferredToPassword = featureFlagService.isFeatureFlagEnabled(.loginMagicLinkEmphasis)
6363
let isWPComMagicLinkShownAsSecondaryActionOnPasswordScreen = featureFlagService.isFeatureFlagEnabled(.loginMagicLinkEmphasisM2)
6464
let isStoreCreationMVPEnabled = featureFlagService.isFeatureFlagEnabled(.storeCreationMVP)
65-
let isNativeJetpackSetupEnabled = ABTest.nativeJetpackSetupFlow.variation != .control
6665
let isWPComLoginRequiredForSiteCredentialsLogin = !featureFlagService.isFeatureFlagEnabled(.applicationPasswordAuthenticationForSiteCredentialLogin)
6766
let configuration = WordPressAuthenticatorConfiguration(wpcomClientId: ApiCredentials.dotcomAppId,
6867
wpcomSecret: ApiCredentials.dotcomSecret,
@@ -91,7 +90,7 @@ class AuthenticationManager: Authentication {
9190
emphasizeEmailForWPComPassword: true,
9291
wpcomPasswordInstructions:
9392
AuthenticationConstants.wpcomPasswordInstructions,
94-
skipXMLRPCCheckForSiteDiscovery: isNativeJetpackSetupEnabled)
93+
skipXMLRPCCheckForSiteDiscovery: true)
9594

9695
let systemGray3LightModeColor = UIColor(red: 199/255.0, green: 199/255.0, blue: 204/255.0, alpha: 1)
9796
let systemLabelLightModeColor = UIColor(red: 0, green: 0, blue: 0, alpha: 1)
@@ -664,39 +663,6 @@ private extension AuthenticationManager {
664663
}
665664
}
666665

667-
/// The error screen to be displayed when the user enters a site
668-
/// without Jetpack in the site discovery flow.
669-
/// More about this flow: pe5sF9-mz-p2.
670-
///
671-
func jetpackErrorUI(for siteURL: String, with matcher: ULAccountMatcher, in navigationController: UINavigationController) -> UIViewController {
672-
let viewModel = JetpackErrorViewModel(siteURL: siteURL,
673-
siteCredentials: nil,
674-
onJetpackSetupCompletion: { [weak self] authorizedEmailAddress in
675-
guard let self = self else { return }
676-
677-
// Tries re-syncing to get an updated store list
678-
ServiceLocator.stores.synchronizeEntities { [weak self] in
679-
guard let self = self else { return }
680-
matcher.refreshStoredSites()
681-
guard let matchedSite = matcher.matchedSite(originalURL: siteURL) else {
682-
DDLogWarn("⚠️ Could not find \(siteURL) connected to the account")
683-
return
684-
}
685-
// checks if the site has woo
686-
if matchedSite.isWooCommerceActive == false {
687-
let noWooUI = self.noWooUI(for: matchedSite,
688-
with: matcher,
689-
navigationController: navigationController,
690-
onStorePickerDismiss: {})
691-
navigationController.show(noWooUI, sender: nil)
692-
} else {
693-
self.startStorePicker(with: matchedSite.siteID, in: navigationController, onDismiss: {})
694-
}
695-
}
696-
})
697-
return ULErrorViewController(viewModel: viewModel)
698-
}
699-
700666
/// The error screen to be displayed when the user tries to enter a site
701667
/// whose Jetpack is not associated with their account.
702668
/// - Parameters:
@@ -777,18 +743,9 @@ private extension AuthenticationManager {
777743
}
778744

779745
// Shows the native Jetpack flow during the site discovery flow.
780-
if ABTest.nativeJetpackSetupFlow.variation != .control {
781-
return jetpackSetupUI(for: site.url,
782-
connectionMissingOnly: site.hasJetpack && site.isJetpackActive,
783-
in: navigationController)
784-
}
785-
786-
/// Jetpack is required. Present an error if we don't detect a valid installation.
787-
guard site.hasJetpack && site.isJetpackActive else {
788-
return jetpackErrorUI(for: site.url, with: matcher, in: navigationController)
789-
}
790-
791-
return accountMismatchUI(for: site.url, siteCredentials: nil, with: matcher, in: navigationController)
746+
return jetpackSetupUI(for: site.url,
747+
connectionMissingOnly: site.hasJetpack && site.isJetpackActive,
748+
in: navigationController)
792749
}
793750

794751
/// Checks if the authenticated user is eligible to use the app and navigates to the home screen.

0 commit comments

Comments
 (0)