Skip to content

Commit 16172ce

Browse files
authored
Merge pull request #8665 from woocommerce/feat/8453-hide-unsupported-ui
REST API: Skip setting up push notification if authenticated without WPCom
2 parents 7aec9d4 + 07101d8 commit 16172ce

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

WooCommerce/Classes/AppDelegate.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,10 @@ private extension AppDelegate {
303303
/// Push Notifications: Authorization + Registration!
304304
///
305305
func setupPushNotificationsManagerIfPossible() {
306-
guard ServiceLocator.stores.isAuthenticated, ServiceLocator.stores.needsDefaultStore == false else {
306+
let stores = ServiceLocator.stores
307+
guard stores.isAuthenticated,
308+
stores.needsDefaultStore == false,
309+
stores.isAuthenticatedWithoutWPCom == false else {
307310
if ServiceLocator.featureFlagService.isFeatureFlagEnabled(.loginErrorNotifications) {
308311
ServiceLocator.pushNotesManager.ensureAuthorizationIsRequested(includesProvisionalAuth: true, onCompletion: nil)
309312
}

0 commit comments

Comments
 (0)