jetpack
jetpack copied to clipboard
Add needsUserConnection function to check user connection status to shared extension utils package
Introduces a new utility function needsUserConnection
in the shared-extension-utils package. This function helps determine if a user connection is required based on two conditions:
- The current user is not connected
- The site is not a simple site
Proposed changes:
- Adds
needsUserConnection
function inneeds-user-connection.js
- Imports and uses
isCurrentUserConnected
andisSimpleSite
utility functions
Other information:
- [ ] Have you written new tests for your changes, if applicable?
- [ ] Have you checked the E2E test CI results, and verified that your changes do not break them?
- [ ] Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?
Jetpack product discussion
None, but see how we needed something like this again in https://github.com/Automattic/jetpack/pull/39064
Does this pull request change what data or activity we track or use?
No
Testing instructions:
- Go to '..'