File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
WooCommerce/Classes/Yosemite Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -164,8 +164,11 @@ class DefaultStoresManager: StoresManager {
164164 state = AuthenticatedState ( credentials: credentials, sessionManager: sessionManager)
165165 sessionManager. defaultCredentials = credentials
166166
167- listenToApplicationPasswordGenerationFailureNotification ( )
168- listenToWPCOMInvalidWPCOMTokenNotification ( )
167+ if case . wpcom = credentials {
168+ listenToWPCOMInvalidWPCOMTokenNotification ( )
169+ } else {
170+ listenToApplicationPasswordGenerationFailureNotification ( )
171+ }
169172
170173 return self
171174 }
@@ -176,10 +179,7 @@ class DefaultStoresManager: StoresManager {
176179 applicationPasswordGenerationFailureObserver = notificationCenter. addObserver ( forName: . ApplicationPasswordsGenerationFailed,
177180 object: nil ,
178181 queue: . main) { [ weak self] note in
179- guard let self else { return }
180- if isAuthenticatedWithoutWPCom {
181- _ = deauthenticate ( )
182- }
182+ _ = self ? . deauthenticate ( )
183183 }
184184 }
185185
You can’t perform that action at this time.
0 commit comments