Skip to content

Commit 847f195

Browse files
committed
Fix an issue where jetpack site is not merged after WP.com log in
1 parent e68ec69 commit 847f195

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

WordPress/Classes/Services/BlogService.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,12 @@ - (void)updateBlogWithRemoteBlog:(RemoteBlog *)remoteBlog account:(WPAccount *)a
493493
{
494494
Blog *blog = [self findBlogWithDotComID:remoteBlog.blogID inAccount:account];
495495

496-
if (!blog && remoteBlog.jetpack) {
496+
// Previously the `remoteBlog.jetpack` property is used to check if the `blog` is connected to Jetpack.
497+
// However, `jetpack` property indicates whether the Jetpack plugin is installed, and the `jetpack_connection`
498+
// property should be the one we should check here.
499+
// See this calypso code for reference:
500+
// https://github.com/Automattic/wp-calypso/blob/61a1eb0968da82e62d992f8d081a4ab3075c7719/client/dashboard/utils/site-types.ts#L3
501+
if (!blog && remoteBlog.jetpackConnection) {
497502
blog = [self migrateRemoteJetpackBlog:remoteBlog forAccount:account inContext:context];
498503
}
499504

0 commit comments

Comments
 (0)