Skip to content

Conversation

@itsmeichigo
Copy link
Contributor

@itsmeichigo itsmeichigo commented Aug 4, 2025

Part of WOOMOB-965

Description

In order to integrate Jetpack connection API endpoint to the Jetpack setup flow, we need to determine whether the site has registered a connection with Jetpack first (ref: pe5sF9-401-p2). The GET jetpack/v4/connection/data endpoint has been updated with a new field isRegistered from Jetpack plugin version 14.4, so this PR updates the response to include this new optional field. Other existing fields connectionOwner and blogID have also been parsed as they will be useful later.

To use the new field, I've also updated the response type for the request.

Testing steps

  • Create a Jurassic Ninja site with WooCommerce and no Jetpack.
  • Log in to the new store on the app using site credentials.
  • After login succeeds, start the Jetpack setup flow from the entry point on the dashboard.
  • Confirm that the setup flow still succeeds.

Testing information

Tested with simulator iPhone 16 iOS 18.4.

Screenshots

Simulator.Screen.Recording.-.iPhone.16.-.2025-08-04.at.11.58.37.mp4

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@itsmeichigo itsmeichigo added this to the 23.0 milestone Aug 4, 2025
@itsmeichigo itsmeichigo added type: task An internally driven task. category: jetpack Specific to Jetpack sites. labels Aug 4, 2025
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Aug 4, 2025

App Icon📲 You can test the changes from this Pull Request in WooCommerce iOS Prototype by scanning the QR code below to install the corresponding build.

App NameWooCommerce iOS Prototype
Build Numberpr15971-3d6c766
Version22.9
Bundle IDcom.automattic.alpha.woocommerce
Commit3d6c766
Installation URL2p33l85bpcrvg
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@itsmeichigo itsmeichigo marked this pull request as ready for review August 4, 2025 04:59
Copy link
Contributor

@RafaelKayumov RafaelKayumov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Works as described. I was able to connect Jetpack on a fresh Jurassic Ninja site.

///
struct JetpackConnectionDataMapper: Mapper {

/// (Attempts) to extract the updated `currentUser` field from a given JSON Encoded response.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super nit: Looks like this comment is from deleted JetpackUserMapper.swift

@dangermattic
Copy link
Collaborator

1 Warning
⚠️ This PR is assigned to the milestone 23.0. This milestone is due in less than 2 days.
Please make sure to get it merged by then or assign it to a milestone with a later deadline.

Generated by 🚫 Danger

@itsmeichigo itsmeichigo merged commit 462f0f0 into trunk Aug 7, 2025
14 checks passed
@itsmeichigo itsmeichigo deleted the woomob-965-jetpack-setup-use-connection-api-to-handle-connection branch August 7, 2025 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: jetpack Specific to Jetpack sites. type: task An internally driven task.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants