Skip to content

Commit 3254be3

Browse files
committed
Skip synchronizing site plan if logged in with WPOrg credentials
1 parent 74de4c1 commit 3254be3

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

WooCommerce/Classes/Yosemite/DefaultStoresManager.swift

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -351,14 +351,17 @@ private extension DefaultStoresManager {
351351
}
352352
dispatch(productSettingsAction)
353353

354-
group.enter()
355-
let sitePlanAction = AccountAction.synchronizeSitePlan(siteID: siteID) { result in
356-
if case let .failure(error) = result {
357-
errors.append(error)
354+
/// skips synchronizing site plan if logged in with WPOrg credentials
355+
if siteID != WooConstants.placeholderStoreID {
356+
group.enter()
357+
let sitePlanAction = AccountAction.synchronizeSitePlan(siteID: siteID) { result in
358+
if case let .failure(error) = result {
359+
errors.append(error)
360+
}
361+
group.leave()
358362
}
359-
group.leave()
363+
dispatch(sitePlanAction)
360364
}
361-
dispatch(sitePlanAction)
362365

363366
group.notify(queue: .main) {
364367
if errors.isEmpty {

0 commit comments

Comments
 (0)