Skip to content

Commit bac2464

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

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 was used to check if the `blog` is connected to Jetpack.
497+
// However, the `jetpack` property indicated whether the Jetpack plugin is installed, and we should check the
498+
// `jetpack_connection` property instead.
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)