Commit b133bcdf035 for woocommerce

commit b133bcdf035e410d95ae39b3cf44ee36e70c8d1f
Author: Bero <1199991+bgrgicak@users.noreply.github.com>
Date:   Mon Nov 30 15:29:07 2026 +0100

    Update Jetpack Connection for WordPress Connectors (#71128)

    Update Jetpack Connection for WordPress Connectors (#71128)

    The bundled Jetpack Connection package (6.19.2) did not show its
    WordPress.com connection card in the WordPress Connectors settings.
    Update it to 9.13.0, the version WooPayments 11.3.0 bundles, along
    with the compatible Jetpack dependencies, so the card is available on
    WordPress 7.0 and later.

    Connection 9.11+ adds a registration backoff: after a failed
    WordPress.com registration, unforced retries are skipped for 1 minute
    up to 24 hours. Registration is therefore forced only where a merchant
    asks for it:

    - Connect and Retry in the core profiler and the task list (#71563).
      Retry now asks for the same flow as Connect, stays disabled until
      its request finishes, announces that it is connecting, and is
      offered when the connection URL request fails. A pending Retry is
      ignored once the merchant skips or aborts.
    - Saving PayPal Standard settings, which onboards to the Transact
      platform with the settings and test mode just saved. The one-time
      onboarding after an update stays unforced.

    JetpackConnection::get_authorization_url() and
    TransactAccountManager::do_onboarding() gain an optional $force
    argument, and the authorization URL endpoint an optional force
    parameter. Existing callers are unaffected.

    Compatibility: Jetpack 9.x removes the deprecated SSO methods
    Notices::sso_not_allowed_in_staging() and
    User_Admin::jetpack_user_connected_th(), and no longer reads the
    jetpack_development_mode and jetpack_sso_disallowed_staging_notice
    hooks. Stores connected only through WooCommerce now send Jetpack's
    anonymous environment heartbeat counters. Rolling back to 6.19.2 no
    longer throws a TypeError in the onboarding email prefill.

    Co-authored-by: Vlad Olaru <vlad@thinkwritecode.com>
    Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

diff --git a/packages/js/data/changelog/add-jetpack-auth-url-force b/packages/js/data/changelog/add-jetpack-auth-url-force
new file mode 100644
index 00000000000..e98133c8901
--- /dev/null
+++ b/packages/js/data/changelog/add-jetpack-auth-url-force
@@ -0,0 +1,4 @@
+Significance: minor
+Type: add
+
+Add an optional `force` argument to `getJetpackAuthUrl` for requesting a fresh WordPress.com registration.
diff --git a/packages/js/data/src/onboarding/resolvers.ts b/packages/js/data/src/onboarding/resolvers.ts
index caa910be222..c7d2378ee40 100644
--- a/packages/js/data/src/onboarding/resolvers.ts
+++ b/packages/js/data/src/onboarding/resolvers.ts
@@ -3,6 +3,7 @@
  */
 import { apiFetch, select } from '@wordpress/data-controls';
 import { controls } from '@wordpress/data';
+import { addQueryArgs } from '@wordpress/url';

 /**
  * Internal dependencies
@@ -171,16 +172,19 @@ export function* getProductTypes() {
 export function* getJetpackAuthUrl( query: {
 	redirectUrl: string;
 	from?: string;
+	// Only when the merchant clicked Connect; see the endpoint's `force` argument for what it skips.
+	force?: boolean;
 } ) {
 	try {
-		let path =
+		const path = addQueryArgs(
 			WC_ADMIN_NAMESPACE +
-			'/onboarding/plugins/jetpack-authorization-url?redirect_url=' +
-			encodeURIComponent( query.redirectUrl );
-
-		if ( query.from ) {
-			path += '&from=' + query.from;
-		}
+				'/onboarding/plugins/jetpack-authorization-url',
+			{
+				redirect_url: query.redirectUrl,
+				from: query.from || undefined,
+				force: query.force || undefined,
+			}
+		);

 		const results: GetJetpackAuthUrlResponse = yield apiFetch( {
 			path,
diff --git a/packages/js/data/src/onboarding/selectors.ts b/packages/js/data/src/onboarding/selectors.ts
index 3396d60495d..3a081753b65 100644
--- a/packages/js/data/src/onboarding/selectors.ts
+++ b/packages/js/data/src/onboarding/selectors.ts
@@ -108,6 +108,7 @@ export const getJetpackAuthUrl = (
 	query: {
 		redirectUrl: string;
 		from?: string;
+		force?: boolean;
 	}
 ): GetJetpackAuthUrlResponse => {
 	return state.jetpackAuthUrls[ query.redirectUrl ] || '';
diff --git a/plugins/woocommerce/changelog/add-wpcom-connectors b/plugins/woocommerce/changelog/add-wpcom-connectors
new file mode 100644
index 00000000000..bf0e44f0582
--- /dev/null
+++ b/plugins/woocommerce/changelog/add-wpcom-connectors
@@ -0,0 +1,4 @@
+Significance: minor
+Type: add
+
+Add a WordPress.com connection option in the WordPress Connectors settings.
diff --git a/plugins/woocommerce/changelog/fix-connect-url-request-failure b/plugins/woocommerce/changelog/fix-connect-url-request-failure
new file mode 100644
index 00000000000..4cdfe5172c5
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-connect-url-request-failure
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Offer Retry, instead of a broken Connect button, when the WordPress.com connection link can't be loaded in a setup task.
diff --git a/plugins/woocommerce/changelog/fix-onboarding-email-prefill-user-data b/plugins/woocommerce/changelog/fix-onboarding-email-prefill-user-data
new file mode 100644
index 00000000000..e53e15e3f65
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-onboarding-email-prefill-user-data
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Prevent an error in the setup wizard's email prefill when the WordPress.com account details could not be loaded.
diff --git a/plugins/woocommerce/changelog/fix-paypal-standard-connect-on-save b/plugins/woocommerce/changelog/fix-paypal-standard-connect-on-save
new file mode 100644
index 00000000000..98e1a9c3e2e
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-paypal-standard-connect-on-save
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Retry the WordPress.com connection when a merchant saves PayPal Standard settings soon after a failed attempt.
diff --git a/plugins/woocommerce/changelog/fix-wpcom-connect-retry b/plugins/woocommerce/changelog/fix-wpcom-connect-retry
new file mode 100644
index 00000000000..758e4cb786b
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-wpcom-connect-retry
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Retry the WordPress.com connection when a merchant clicks Connect again soon after a failed attempt.
diff --git a/plugins/woocommerce/client/admin/client/core-profiler/index.tsx b/plugins/woocommerce/client/admin/client/core-profiler/index.tsx
index bcd4d082441..50dbf86e6e3 100644
--- a/plugins/woocommerce/client/admin/client/core-profiler/index.tsx
+++ b/plugins/woocommerce/client/admin/client/core-profiler/index.tsx
@@ -16,7 +16,7 @@ import {
 } from 'xstate5';
 import { useMachine, useSelector } from '@xstate5/react';
 import { useMemo } from '@wordpress/element';
-import { resolveSelect, dispatch } from '@wordpress/data';
+import { resolveSelect, dispatch, select } from '@wordpress/data';
 import { store as coreStore } from '@wordpress/core-data';
 import { addQueryArgs } from '@wordpress/url';
 import {
@@ -360,14 +360,35 @@ const exitToWooHome = fromPromise(
 	}
 );

+// The prefetch and the exit must ask with the same arguments: the exit then waits for a prefetch that is
+// still registering. Two registrations at once would share one secret, and WordPress.com accepts only the first.
+const getJetpackAuthUrlQuery = () => ( {
+	redirectUrl: getAdminLink( 'admin.php?page=wc-admin' ),
+	from: 'woocommerce-core-profiler',
+} );
+
 const exitToJetpackAuth = fromPromise( async () => {
 	// Coming Soon setup is best effort, as in exitToWooHome.
 	await dispatch( onboardingStore )
 		.coreProfilerCompleted()
 		.catch( logProfilerError );
+	const query = getJetpackAuthUrlQuery();
+	// Only the plugin step prefetches. Without one, go straight to the forced request, so one click makes one registration attempt.
+	if (
+		select( onboardingStore ).hasStartedResolution( 'getJetpackAuthUrl', [
+			query,
+		] )
+	) {
+		const prefetched =
+			await resolveSelect( onboardingStore ).getJetpackAuthUrl( query );
+		if ( prefetched?.success ) {
+			return prefetched;
+		}
+	}
+	// The merchant clicked through, so register with the backoff skipped.
 	return await resolveSelect( onboardingStore ).getJetpackAuthUrl( {
-		redirectUrl: getAdminLink( 'admin.php?page=wc-admin' ),
-		from: 'woocommerce-core-profiler',
+		...query,
+		force: true,
 	} );
 } );

@@ -617,10 +638,9 @@ const preFetchJetpackAuthUrl = assign( {
 	jetpackAuthUrlRef: ( { spawn } ) =>
 		spawn(
 			fromPromise( async () =>
-				resolveSelect( onboardingStore ).getJetpackAuthUrl( {
-					redirectUrl: getAdminLink( 'admin.php?page=wc-admin' ),
-					from: 'woocommerce-core-profiler',
-				} )
+				resolveSelect( onboardingStore ).getJetpackAuthUrl(
+					getJetpackAuthUrlQuery()
+				)
 			)
 		),
 } );
diff --git a/plugins/woocommerce/client/admin/client/core-profiler/test/skip-flow-rest-failures.test.ts b/plugins/woocommerce/client/admin/client/core-profiler/test/skip-flow-rest-failures.test.ts
index f360e5469a9..cb5e39126e7 100644
--- a/plugins/woocommerce/client/admin/client/core-profiler/test/skip-flow-rest-failures.test.ts
+++ b/plugins/woocommerce/client/admin/client/core-profiler/test/skip-flow-rest-failures.test.ts
@@ -36,29 +36,42 @@ const mockJetpackAuthResult = {
 	success: true,
 	url: 'https://jetpack.test/authorize',
 };
+const mockGetJetpackAuthUrl = jest.fn<
+	Record< string, unknown >,
+	[ { force?: boolean } ]
+>( () => mockJetpackAuthResult );
+// Whether the plugin step's prefetch of the Jetpack auth URL has started.
+const mockHasStartedResolution = jest.fn( () => true );
 const mockFailingRequests = new Set< string >();
 const mockStoreCalls: string[] = [];
 function mockWooStore( resolvedValues: Record< string, unknown > ) {
 	return new Proxy(
 		{},
 		{
-			get: ( _target, name: string ) => () => {
-				mockStoreCalls.push( name );
-				if (
-					! mockFailingRequests.has( name ) &&
-					! mockFailingRequests.has( '*' )
-				) {
-					return Promise.resolve( resolvedValues[ name ] );
-				}
-				// apiFetch rejects with a plain error object, not an Error.
-				const request = Promise.reject( {
-					code: 'rest_no_route',
-					message: `${ name } failed`,
-				} );
-				// The profiler fires some writes without awaiting them; awaiting callers still see the rejection.
-				request.catch( () => undefined );
-				return request;
-			},
+			get:
+				( _target, name: string ) =>
+				( ...args: unknown[] ) => {
+					mockStoreCalls.push( name );
+					if (
+						! mockFailingRequests.has( name ) &&
+						! mockFailingRequests.has( '*' )
+					) {
+						const value = resolvedValues[ name ];
+						return Promise.resolve(
+							typeof value === 'function'
+								? value( ...args )
+								: value
+						);
+					}
+					// apiFetch rejects with a plain error object, not an Error.
+					const request = Promise.reject( {
+						code: 'rest_no_route',
+						message: `${ name } failed`,
+					} );
+					// The profiler fires some writes without awaiting them; awaiting callers still see the rejection.
+					request.catch( () => undefined );
+					return request;
+				},
 		}
 	);
 }
@@ -70,13 +83,17 @@ jest.mock( '@wordpress/data', () => {
 		...actual,
 		dispatch: ( store: { name: string } ) =>
 			isWooStore( store ) ? mockWooStore( {} ) : actual.dispatch( store ),
+		select: ( store: { name: string } ) =>
+			isWooStore( store )
+				? { hasStartedResolution: mockHasStartedResolution }
+				: actual.select( store ),
 		resolveSelect: ( store: { name: string } ) =>
 			isWooStore( store )
 				? mockWooStore( {
 						getCountries: [],
 						getFreeExtensions: [],
 						getCoreProfilerCompletedSteps: {},
-						getJetpackAuthUrl: mockJetpackAuthResult,
+						getJetpackAuthUrl: mockGetJetpackAuthUrl,
 					} )
 				: actual.resolveSelect( store ),
 	};
@@ -259,4 +276,59 @@ describe( 'Core Profiler skip flow when REST requests fail', () => {
 		] );
 		expectLoggedFailure( 'coreProfilerCompleted' );
 	} );
+
+	const prefetchQuery = {
+		redirectUrl: expect.any( String ),
+		from: 'woocommerce-core-profiler',
+	};
+	const forcedQuery = { ...prefetchQuery, force: true };
+
+	it.each( [
+		{
+			name: 'reuses a successful prefetch without forcing registration',
+			prefetched: true,
+			prefetchFails: false,
+			queries: [ prefetchQuery ],
+		},
+		{
+			name: 'retries with a forced registration once the prefetch failed',
+			prefetched: true,
+			prefetchFails: true,
+			queries: [ prefetchQuery, forcedQuery ],
+		},
+		{
+			// Only the plugin step prefetches; skipping it leaves nothing to await.
+			name: 'forces registration straight away when no prefetch ran',
+			prefetched: false,
+			prefetchFails: false,
+			queries: [ forcedQuery ],
+		},
+	] )(
+		'the exit to Jetpack auth $name',
+		async ( { prefetched, prefetchFails, queries } ) => {
+			mockHasStartedResolution.mockReturnValueOnce( prefetched );
+			if ( prefetchFails ) {
+				mockGetJetpackAuthUrl.mockReturnValueOnce( {
+					success: false,
+					errors: [ 'Held back after an earlier failure.' ],
+					url: 'https://jetpack.test/authorize',
+				} );
+			}
+			const actor = createActor(
+				coreProfilerMachineActors.exitToJetpackAuth
+			).start();
+
+			await expect( toPromise( actor ) ).resolves.toEqual(
+				mockJetpackAuthResult
+			);
+			expect(
+				mockGetJetpackAuthUrl.mock.calls.map( ( [ q ] ) => q )
+			).toEqual( queries );
+			// The same arguments as the prefetch, so a prefetch still registering is found and awaited instead of raced.
+			expect( mockHasStartedResolution ).toHaveBeenCalledWith(
+				'getJetpackAuthUrl',
+				[ prefetchQuery ]
+			);
+		}
+	);
 } );
diff --git a/plugins/woocommerce/client/admin/client/dashboard/components/connect/index.js b/plugins/woocommerce/client/admin/client/dashboard/components/connect/index.js
index 5321a191517..b9121c1bb77 100644
--- a/plugins/woocommerce/client/admin/client/dashboard/components/connect/index.js
+++ b/plugins/woocommerce/client/admin/client/dashboard/components/connect/index.js
@@ -2,6 +2,7 @@
  * External dependencies
  */
 import { __ } from '@wordpress/i18n';
+import { speak } from '@wordpress/a11y';
 import { Button } from '@wordpress/components';
 import { Component, Fragment } from '@wordpress/element';
 import { compose } from '@wordpress/compose';
@@ -9,6 +10,11 @@ import PropTypes from 'prop-types';
 import { withDispatch, withSelect } from '@wordpress/data';
 import { onboardingStore } from '@woocommerce/data';

+const getAuthUrlQuery = ( { redirectUrl, from } ) => ( {
+	redirectUrl: redirectUrl || window.location.href,
+	from,
+} );
+
 /**
  * Button redirecting to Jetpack auth flow.
  *
@@ -22,16 +28,29 @@ export class Connect extends Component {
 		this.state = {
 			isAwaitingRedirect: false,
 			isRedirecting: false,
+			isRetrying: false,
 		};

+		// Counts Retry requests; Skip and Abort bump it so a pending Retry's result is ignored.
+		this.retryRequest = 0;
+		this.isUnmounted = false;
+
 		this.connectJetpack = this.connectJetpack.bind( this );
+		this.retryConnection = this.retryConnection.bind( this );
+		this.skip = this.skip.bind( this );
+		this.abort = this.abort.bind( this );
 		props.setIsPending( false );
 	}

+	componentWillUnmount() {
+		this.isUnmounted = true;
+	}
+
 	componentDidUpdate( prevProps ) {
 		const { createNotice, error, onError, isRequesting } = this.props;

-		if ( error && error !== prevProps.error ) {
+		// A retry reports its own outcome.
+		if ( error && error !== prevProps.error && ! this.state.isRetrying ) {
 			if ( onError ) {
 				onError();
 			}
@@ -60,15 +79,74 @@ export class Connect extends Component {
 		this.setState( { isAwaitingRedirect: true } );
 	}

+	skip() {
+		this.retryRequest++;
+		this.props.onSkip();
+	}
+
+	abort() {
+		this.retryRequest++;
+		this.props.onAbort();
+	}
+
+	async retryConnection() {
+		const { requestJetpackAuthUrl, onConnect, onError, createNotice } =
+			this.props;
+		const request = ++this.retryRequest;
+
+		this.setState( { isRetrying: true } );
+		// The busy button is only visual; the wait can take seconds.
+		speak( __( 'Connecting to WordPress.com…', 'woocommerce' ) );
+		// Only a click forces registration; the URL fetched on render stays unforced.
+		const response = await requestJetpackAuthUrl( {
+			...getAuthUrlQuery( this.props ),
+			force: true,
+		} );
+
+		if ( this.isUnmounted ) {
+			return;
+		}
+		// The merchant chose Skip or Abort while the request was pending: don't connect or redirect.
+		if ( request !== this.retryRequest ) {
+			this.setState( { isRetrying: false } );
+			return;
+		}
+
+		if ( response?.success && response.url ) {
+			if ( onConnect ) {
+				onConnect();
+			}
+			this.setState( { isRedirecting: true } );
+			window.location = response.url;
+			return;
+		}
+
+		this.setState( { isRetrying: false } );
+		if ( onError ) {
+			onError();
+		}
+		createNotice(
+			'error',
+			response?.errors?.[ 0 ] ||
+				__( 'Error requesting connection URL.', 'woocommerce' )
+		);
+	}
+
 	render() {
 		const { error, onSkip, skipText, onAbort, abortText } = this.props;
+		const { isRetrying } = this.state;

 		return (
 			<Fragment>
-				{ error ? (
+				{ /* A successful retry clears the error before the page navigates away. */ }
+				{ error || isRetrying ? (
 					<Button
+						// Each click forces a registration, so a second one must wait for the first.
+						accessibleWhenDisabled
+						disabled={ isRetrying }
+						isBusy={ isRetrying }
 						isPrimary
-						onClick={ () => window.location.reload() }
+						onClick={ this.retryConnection }
 					>
 						{ __( 'Retry', 'woocommerce' ) }
 					</Button>
@@ -82,12 +160,12 @@ export class Connect extends Component {
 					</Button>
 				) }
 				{ onSkip && (
-					<Button onClick={ onSkip }>
+					<Button onClick={ this.skip }>
 						{ skipText || __( 'No thanks', 'woocommerce' ) }
 					</Button>
 				) }
 				{ onAbort && (
-					<Button onClick={ onAbort }>
+					<Button onClick={ this.abort }>
 						{ abortText || __( 'Abort', 'woocommerce' ) }
 					</Button>
 				) }
@@ -151,33 +229,42 @@ Connect.propTypes = {
 	 * Source identifier for the connection.
 	 */
 	from: PropTypes.string,
+	/**
+	 * Requests a new authorization URL; Retry uses it to force a fresh registration.
+	 */
+	requestJetpackAuthUrl: PropTypes.func.isRequired,
 };

+// No `from` default: withSelect sees only the caller's props, so a default here would make Retry ask for a different flow than Connect.
 Connect.defaultProps = {
 	setIsPending: () => {},
-	from: 'woocommerce-services',
 };

 export default compose(
 	withSelect( ( select, props ) => {
-		const { getJetpackAuthUrl, isResolving } = select( onboardingStore );
+		const { getJetpackAuthUrl, isResolving, hasFinishedResolution } =
+			select( onboardingStore );

-		const queryArgs = {
-			redirectUrl: props.redirectUrl || window.location.href,
-			from: props.from,
-		};
+		const queryArgs = getAuthUrlQuery( props );

 		const jetpackAuthUrlResponse = getJetpackAuthUrl( queryArgs );
 		const isRequesting = isResolving( 'getJetpackAuthUrl', [ queryArgs ] );

 		let error;

-		if ( ! isResolving && ! jetpackAuthUrlResponse ) {
+		// The resolver keeps no response when the request itself fails.
+		if (
+			hasFinishedResolution( 'getJetpackAuthUrl', [ queryArgs ] ) &&
+			! jetpackAuthUrlResponse
+		) {
 			error = __( 'Error requesting connection URL.', 'woocommerce' );
 		}

 		if ( jetpackAuthUrlResponse?.errors?.length ) {
-			error = jetpackAuthUrlResponse?.errors[ 0 ];
+			// A registration held back after a 5xx failure reports an empty message.
+			error =
+				jetpackAuthUrlResponse.errors[ 0 ] ||
+				__( 'Error requesting connection URL.', 'woocommerce' );
 		}

 		return {
@@ -186,11 +273,19 @@ export default compose(
 			jetpackAuthUrl: jetpackAuthUrlResponse.url,
 		};
 	} ),
-	withDispatch( ( dispatch ) => {
+	withDispatch( ( dispatch, ownProps, { resolveSelect } ) => {
 		const { createNotice } = dispatch( 'core/notices' );
+		const { invalidateResolution } = dispatch( onboardingStore );

 		return {
 			createNotice,
+			// Drops the cached result first, so every Retry sends a new request.
+			requestJetpackAuthUrl: async ( query ) => {
+				await invalidateResolution( 'getJetpackAuthUrl', [ query ] );
+				return resolveSelect( onboardingStore ).getJetpackAuthUrl(
+					query
+				);
+			},
 		};
 	} )
 )( Connect );
diff --git a/plugins/woocommerce/client/admin/client/dashboard/components/connect/test/index.js b/plugins/woocommerce/client/admin/client/dashboard/components/connect/test/index.js
index 3e5e8a3269f..e902957d7b8 100644
--- a/plugins/woocommerce/client/admin/client/dashboard/components/connect/test/index.js
+++ b/plugins/woocommerce/client/admin/client/dashboard/components/connect/test/index.js
@@ -1,18 +1,72 @@
 /**
  * External dependencies
  */
-import { render } from '@testing-library/react';
+import { render, fireEvent, waitFor } from '@testing-library/react';
 import { createElement } from '@wordpress/element';
+import apiFetch from '@wordpress/api-fetch';
+import {
+	createReduxStore,
+	createRegistry,
+	RegistryProvider,
+} from '@wordpress/data';
+import { onboardingStore } from '@woocommerce/data';
+import { mockBrowserLocation } from '@woocommerce/internal-js-tests';
+import { speak } from '@wordpress/a11y';

 /**
  * Internal dependencies
  */
-import { Connect } from '../index.js';
+import ConnectedConnect, { Connect } from '../index.js';
+
+jest.mock( '@wordpress/a11y', () => ( {
+	speak: jest.fn(),
+} ) );
+
+// jsdom cannot navigate, so the tests record redirects and reloads instead.
+const setHref = mockBrowserLocation( 'href' );
+const reload = mockBrowserLocation( 'reload' );
+
+const AUTH_URL = 'https://jetpack.test/authorize';
+const HELD_BACK = 'Held back after an earlier failure.';
+const HELD_BACK_RESPONSE = {
+	success: false,
+	errors: [ HELD_BACK ],
+	url: AUTH_URL,
+};
+
+// A request that stays pending until the test settles it.
+const pendingRequest = () => {
+	let settle;
+	const request = jest.fn(
+		() =>
+			new Promise( ( resolve ) => {
+				settle = resolve;
+			} )
+	);
+	return { request, settle: ( value ) => settle( value ) };
+};
+
+// The Connect step after the unforced request failed, so it offers Retry.
+const renderRetry = ( props ) => {
+	const view = render(
+		<Connect
+			createNotice={ jest.fn() }
+			error={ HELD_BACK }
+			requestJetpackAuthUrl={ jest.fn() }
+			{ ...props }
+		/>
+	);
+	return { ...view, retry: view.getByRole( 'button', { name: 'Retry' } ) };
+};

 describe( 'Rendering', () => {
 	it( 'should render an abort button when the abort handler is provided', async () => {
 		const { container } = render(
-			<Connect createNotice={ () => {} } onAbort={ () => {} } />
+			<Connect
+				createNotice={ () => {} }
+				onAbort={ () => {} }
+				requestJetpackAuthUrl={ jest.fn() }
+			/>
 		);

 		const buttons = container.querySelectorAll( 'button' );
@@ -21,3 +75,275 @@ describe( 'Rendering', () => {
 		expect( buttons[ 1 ].textContent ).toBe( 'Abort' );
 	} );
 } );
+
+describe( 'Retry', () => {
+	it( 'requests a forced authorization URL and redirects when it succeeds', async () => {
+		const requestJetpackAuthUrl = jest
+			.fn()
+			.mockResolvedValue( { success: true, url: AUTH_URL } );
+		const onConnect = jest.fn();
+		const { retry } = renderRetry( {
+			from: 'woocommerce-services',
+			onConnect,
+			redirectUrl: 'https://store.test/wp-admin/admin.php?page=wc-admin',
+			requestJetpackAuthUrl,
+		} );
+
+		fireEvent.click( retry );
+
+		await waitFor( () =>
+			expect( setHref ).toHaveBeenCalledWith( AUTH_URL )
+		);
+		expect( requestJetpackAuthUrl ).toHaveBeenCalledWith( {
+			redirectUrl: 'https://store.test/wp-admin/admin.php?page=wc-admin',
+			from: 'woocommerce-services',
+			force: true,
+		} );
+		expect( onConnect ).toHaveBeenCalled();
+		expect( reload ).not.toHaveBeenCalled();
+	} );
+
+	it( 'announces it is connecting and ignores further clicks while pending', () => {
+		const { request } = pendingRequest();
+		const { retry } = renderRetry( { requestJetpackAuthUrl: request } );
+
+		fireEvent.click( retry );
+		fireEvent.click( retry );
+
+		expect( request ).toHaveBeenCalledTimes( 1 );
+		// Disabled, but still focusable for keyboard and screen reader users.
+		expect( retry ).toHaveAttribute( 'aria-disabled', 'true' );
+		expect( speak ).toHaveBeenCalledWith( 'Connecting to WordPress.com…' );
+	} );
+
+	it.each( [
+		[
+			'a message',
+			{ success: false, errors: [ 'The site could not be registered.' ] },
+			'The site could not be registered.',
+		],
+		[ 'no response', undefined, 'Error requesting connection URL.' ],
+		[
+			'an empty message',
+			{ success: false, errors: [ '' ] },
+			'Error requesting connection URL.',
+		],
+	] )(
+		'shows one error and stays on the page when the forced request fails with %s',
+		async ( _case, response, message ) => {
+			const createNotice = jest.fn();
+			const onError = jest.fn();
+			const { retry } = renderRetry( {
+				createNotice,
+				onError,
+				requestJetpackAuthUrl: jest.fn().mockResolvedValue( response ),
+			} );
+
+			fireEvent.click( retry );
+
+			await waitFor( () =>
+				expect( createNotice ).toHaveBeenCalledWith( 'error', message )
+			);
+			expect( onError ).toHaveBeenCalledTimes( 1 );
+			expect( setHref ).not.toHaveBeenCalled();
+		}
+	);
+
+	it.each( [
+		[ 'Skip', 'onSkip', 'No thanks' ],
+		[ 'Abort', 'onAbort', 'Abort' ],
+	] )(
+		'does not connect or redirect when the merchant chooses %s while Retry is pending',
+		async ( _choice, handlerProp, buttonName ) => {
+			const { request, settle } = pendingRequest();
+			const handler = jest.fn();
+			const onConnect = jest.fn();
+			const { retry, getByRole } = renderRetry( {
+				onConnect,
+				requestJetpackAuthUrl: request,
+				[ handlerProp ]: handler,
+			} );
+
+			fireEvent.click( retry );
+			fireEvent.click( getByRole( 'button', { name: buttonName } ) );
+			settle( { success: true, url: AUTH_URL } );
+
+			await waitFor( () =>
+				expect( retry ).not.toHaveAttribute( 'aria-disabled', 'true' )
+			);
+			expect( handler ).toHaveBeenCalledTimes( 1 );
+			expect( onConnect ).not.toHaveBeenCalled();
+			expect( setHref ).not.toHaveBeenCalled();
+		}
+	);
+
+	it( 'does not redirect when it unmounts while Retry is pending', async () => {
+		const { request, settle } = pendingRequest();
+		const onConnect = jest.fn();
+		const { retry, unmount } = renderRetry( {
+			onConnect,
+			requestJetpackAuthUrl: request,
+		} );
+
+		fireEvent.click( retry );
+		unmount();
+		await settle( { success: true, url: AUTH_URL } );
+		await Promise.resolve();
+
+		expect( onConnect ).not.toHaveBeenCalled();
+		expect( setHref ).not.toHaveBeenCalled();
+	} );
+} );
+
+const createTestRegistry = ( onNotice = () => {} ) => {
+	const registry = createRegistry();
+	registry.register( onboardingStore );
+	// The component sends its notices here; the test only needs the store to exist.
+	registry.register(
+		createReduxStore( 'core/notices', {
+			reducer: ( state = [] ) => state,
+			actions: {
+				createNotice: ( ...args ) => {
+					onNotice( ...args );
+					return { type: 'CREATE_NOTICE' };
+				},
+			},
+		} )
+	);
+	return registry;
+};
+
+const renderConnected = ( props, registry = createTestRegistry() ) =>
+	render(
+		<RegistryProvider value={ registry }>
+			<ConnectedConnect
+				redirectUrl="https://store.test/wp-admin/"
+				{ ...props }
+			/>
+		</RegistryProvider>
+	);
+
+// Answers the render-time request with a held-back failure and a forced one with `forced`.
+const fetchForced =
+	( forced ) =>
+	async ( { path } ) =>
+		path.includes( 'force=true' ) ? forced : HELD_BACK_RESPONSE;
+
+describe( 'Retry with the onboarding store', () => {
+	it( 'sends a new forced request on every click, not the cached result', async () => {
+		const forcedPaths = [];
+		apiFetch.setFetchHandler( async ( { path } ) => {
+			if ( path.includes( 'force=true' ) ) {
+				forcedPaths.push( path );
+			}
+			return HELD_BACK_RESPONSE;
+		} );
+		const { findByRole } = renderConnected();
+		const retry = await findByRole( 'button', { name: 'Retry' } );
+
+		fireEvent.click( retry );
+		await waitFor( () => expect( forcedPaths ).toHaveLength( 1 ) );
+		// The caller passed no `from`, so Retry asks for the same flow the request on render did.
+		expect( forcedPaths[ 0 ] ).not.toContain( 'from=' );
+		await waitFor( () => expect( retry ).not.toHaveClass( 'is-busy' ) );
+		fireEvent.click( retry );
+
+		await waitFor( () => expect( forcedPaths ).toHaveLength( 2 ) );
+	} );
+
+	it.each( [
+		[
+			'a held-back registration reports no message',
+			// After a 5xx failure the connection package keeps no message, so the response has an empty error.
+			async () => ( { ...HELD_BACK_RESPONSE, errors: [ '' ] } ),
+		],
+		[
+			'the request fails outright',
+			async () => {
+				throw {
+					code: 'rest_cookie_invalid_nonce',
+					message: 'Expired.',
+				};
+			},
+		],
+	] )(
+		'offers Retry, not Connect, when %s',
+		async ( _case, fetchHandler ) => {
+			apiFetch.setFetchHandler( fetchHandler );
+			const { findByRole, queryByRole } = renderConnected();
+
+			expect(
+				await findByRole( 'button', { name: 'Retry' } )
+			).toBeInTheDocument();
+			expect(
+				queryByRole( 'button', { name: 'Connect' } )
+			).not.toBeInTheDocument();
+		}
+	);
+
+	it( 'reports a failed retry once, though its error replaces the cached one', async () => {
+		apiFetch.setFetchHandler(
+			fetchForced( {
+				...HELD_BACK_RESPONSE,
+				errors: [ 'The site could not be registered.' ],
+			} )
+		);
+		const onNotice = jest.fn();
+		const onError = jest.fn();
+		const { findByRole } = renderConnected(
+			{ onError },
+			createTestRegistry( onNotice )
+		);
+		const retry = await findByRole( 'button', { name: 'Retry' } );
+		// The failure that rendered Retry is reported on its own.
+		await waitFor( () => expect( onError ).toHaveBeenCalledTimes( 1 ) );
+		onNotice.mockClear();
+		onError.mockClear();
+
+		fireEvent.click( retry );
+
+		await waitFor( () =>
+			expect( retry ).not.toHaveAttribute( 'aria-disabled' )
+		);
+		expect( onNotice.mock.calls ).toEqual( [
+			[ 'error', 'The site could not be registered.' ],
+		] );
+		expect( onError ).toHaveBeenCalledTimes( 1 );
+	} );
+
+	it( 'offers Connect, not an error, while the first request is pending', async () => {
+		let requested = false;
+		apiFetch.setFetchHandler( () => {
+			requested = true;
+			return new Promise( () => {} );
+		} );
+		const { getByRole, queryByRole } = renderConnected();
+
+		await waitFor( () => expect( requested ).toBe( true ) );
+		expect(
+			getByRole( 'button', { name: 'Connect' } )
+		).toBeInTheDocument();
+		expect(
+			queryByRole( 'button', { name: 'Retry' } )
+		).not.toBeInTheDocument();
+	} );
+
+	it( 'keeps Retry busy while a successful retry redirects', async () => {
+		apiFetch.setFetchHandler(
+			fetchForced( { success: true, url: AUTH_URL } )
+		);
+		const { findByRole, queryByRole } = renderConnected();
+		const retry = await findByRole( 'button', { name: 'Retry' } );
+
+		fireEvent.click( retry );
+
+		await waitFor( () =>
+			expect( setHref ).toHaveBeenCalledWith( AUTH_URL )
+		);
+		// The success replaces the cached failure; the page must not offer Connect while it navigates.
+		expect(
+			queryByRole( 'button', { name: 'Connect' } )
+		).not.toBeInTheDocument();
+		expect( retry ).toHaveAttribute( 'aria-disabled', 'true' );
+	} );
+} );
diff --git a/plugins/woocommerce/composer.json b/plugins/woocommerce/composer.json
index 98f41173e38..abbaf3416d0 100644
--- a/plugins/woocommerce/composer.json
+++ b/plugins/woocommerce/composer.json
@@ -41,11 +41,11 @@
 	"require": {
 		"php": ">=7.4",
 		"automattic/block-delimiter": "0.3.4",
-		"automattic/jetpack-a8c-mc-stats": "^3.0.0",
+		"automattic/jetpack-a8c-mc-stats": "^4.0.1",
 		"automattic/jetpack-autoloader": "5.0.0",
 		"automattic/jetpack-config": "3.0.0",
-		"automattic/jetpack-connection": "^6.11.1",
-		"automattic/jetpack-constants": "^3.0.1",
+		"automattic/jetpack-connection": "^9.13.0",
+		"automattic/jetpack-constants": "^4.0.1",
 		"automattic/tracks-shared-utils": "^1.1",
 		"composer/installers": "^1.9",
 		"maxmind-db/reader": "^1.11",
diff --git a/plugins/woocommerce/composer.lock b/plugins/woocommerce/composer.lock
index 905ac40f6c6..e8aff3c8e1a 100644
--- a/plugins/woocommerce/composer.lock
+++ b/plugins/woocommerce/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "f0e8a17de0be2b5097d0b4e7c74fbfb8",
+    "content-hash": "02b5685a8659668eb5c6f2f5592f65b5",
     "packages": [
         {
             "name": "automattic/block-delimiter",
@@ -60,24 +60,23 @@
         },
         {
             "name": "automattic/jetpack-a8c-mc-stats",
-            "version": "v3.0.5",
+            "version": "v4.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/Automattic/jetpack-a8c-mc-stats.git",
-                "reference": "60401a41c714d93f7a31e36493260ad6683ca4be"
+                "reference": "419d41bfde3e394a2527b1260507fb1877eb0e68"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/Automattic/jetpack-a8c-mc-stats/zipball/60401a41c714d93f7a31e36493260ad6683ca4be",
-                "reference": "60401a41c714d93f7a31e36493260ad6683ca4be",
+                "url": "https://api.github.com/repos/Automattic/jetpack-a8c-mc-stats/zipball/419d41bfde3e394a2527b1260507fb1877eb0e68",
+                "reference": "419d41bfde3e394a2527b1260507fb1877eb0e68",
                 "shasum": ""
             },
             "require": {
-                "php": ">=7.2"
+                "php": ">=7.4"
             },
             "require-dev": {
-                "automattic/jetpack-changelogger": "^6.0.5",
-                "automattic/phpunit-select-config": "^1.0.3",
+                "automattic/phpunit-select-config": "^1.0.12",
                 "yoast/phpunit-polyfills": "^4.0.0"
             },
             "suggest": {
@@ -85,10 +84,9 @@
             },
             "type": "jetpack-library",
             "extra": {
-                "autotagger": true,
                 "mirror-repo": "Automattic/jetpack-a8c-mc-stats",
                 "branch-alias": {
-                    "dev-trunk": "3.0.x-dev"
+                    "dev-trunk": "4.1.x-dev"
                 },
                 "changelogger": {
                     "link-template": "https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v${old}...v${new}"
@@ -105,32 +103,33 @@
             ],
             "description": "Used to record internal usage stats for Automattic. Not visible to site owners.",
             "support": {
-                "source": "https://github.com/Automattic/jetpack-a8c-mc-stats/tree/v3.0.5"
+                "source": "https://github.com/Automattic/jetpack-a8c-mc-stats/tree/v4.1.0"
             },
-            "time": "2025-04-28T15:12:40+00:00"
+            "time": "2026-11-16T15:45:47+00:00",
+            "published-time": "2026-11-16T15:46:01+00:00"
         },
         {
             "name": "automattic/jetpack-admin-ui",
-            "version": "v0.5.11",
+            "version": "v0.14.14",
             "source": {
                 "type": "git",
                 "url": "https://github.com/Automattic/jetpack-admin-ui.git",
-                "reference": "51268f256c821ebcdaaa769f3249d34e0106cfb2"
+                "reference": "3383c3f37c9a3943d1f8f2798299f3376d123c30"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/Automattic/jetpack-admin-ui/zipball/51268f256c821ebcdaaa769f3249d34e0106cfb2",
-                "reference": "51268f256c821ebcdaaa769f3249d34e0106cfb2",
+                "url": "https://api.github.com/repos/Automattic/jetpack-admin-ui/zipball/3383c3f37c9a3943d1f8f2798299f3376d123c30",
+                "reference": "3383c3f37c9a3943d1f8f2798299f3376d123c30",
                 "shasum": ""
             },
             "require": {
-                "php": ">=7.2"
+                "automattic/jetpack-redirect": "^4.0.1",
+                "automattic/jetpack-status": "^7.1.1",
+                "php": ">=7.4"
             },
             "require-dev": {
-                "automattic/jetpack-changelogger": "^6.0.5",
-                "automattic/jetpack-logo": "^3.0.5",
-                "automattic/jetpack-test-environment": "@dev",
-                "automattic/phpunit-select-config": "^1.0.3",
+                "automattic/jetpack-logo": "^4.0.2",
+                "automattic/phpunit-select-config": "^1.0.12",
                 "yoast/phpunit-polyfills": "^4.0.0"
             },
             "suggest": {
@@ -138,15 +137,19 @@
             },
             "type": "jetpack-library",
             "extra": {
-                "autotagger": true,
                 "textdomain": "jetpack-admin-ui",
                 "mirror-repo": "Automattic/jetpack-admin-ui",
                 "branch-alias": {
-                    "dev-trunk": "0.5.x-dev"
+                    "dev-trunk": "0.14.x-dev"
                 },
                 "changelogger": {
                     "link-template": "https://github.com/Automattic/jetpack-admin-ui/compare/${old}...${new}"
                 },
+                "dependencies": {
+                    "test-only": [
+                        "packages/connection"
+                    ]
+                },
                 "version-constants": {
                     "::PACKAGE_VERSION": "src/class-admin-menu.php"
                 }
@@ -162,34 +165,34 @@
             ],
             "description": "Generic Jetpack wp-admin UI elements",
             "support": {
-                "source": "https://github.com/Automattic/jetpack-admin-ui/tree/v0.5.11"
+                "source": "https://github.com/Automattic/jetpack-admin-ui/tree/v0.14.14"
             },
-            "time": "2025-08-04T15:36:38+00:00"
+            "time": "2026-11-09T16:45:57+00:00",
+            "published-time": "2026-11-09T16:46:11+00:00"
         },
         {
             "name": "automattic/jetpack-assets",
-            "version": "v4.3.11",
+            "version": "v5.0.19",
             "source": {
                 "type": "git",
                 "url": "https://github.com/Automattic/jetpack-assets.git",
-                "reference": "02b14206e6f0713aea9c79af55b67422eaa17c39"
+                "reference": "6749d7a375121e82a0d549f478bacf9d1fa86d07"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/Automattic/jetpack-assets/zipball/02b14206e6f0713aea9c79af55b67422eaa17c39",
-                "reference": "02b14206e6f0713aea9c79af55b67422eaa17c39",
+                "url": "https://api.github.com/repos/Automattic/jetpack-assets/zipball/6749d7a375121e82a0d549f478bacf9d1fa86d07",
+                "reference": "6749d7a375121e82a0d549f478bacf9d1fa86d07",
                 "shasum": ""
             },
             "require": {
-                "automattic/jetpack-constants": "^3.0.8",
-                "automattic/jetpack-status": "^6.1.0",
-                "php": ">=7.2"
+                "automattic/jetpack-constants": "^4.0.1",
+                "automattic/jetpack-status": "^7.1.1",
+                "php": ">=7.4"
             },
             "require-dev": {
-                "automattic/jetpack-changelogger": "^6.0.7",
-                "automattic/phpunit-select-config": "^1.0.3",
+                "automattic/phpunit-select-config": "^1.0.12",
                 "brain/monkey": "^2.6.2",
-                "wikimedia/testing-access-wrapper": "^1.0 || ^2.0 || ^3.0",
+                "wikimedia/testing-access-wrapper": "^3.0 || ^4.0",
                 "yoast/phpunit-polyfills": "^4.0.0"
             },
             "suggest": {
@@ -197,11 +200,10 @@
             },
             "type": "jetpack-library",
             "extra": {
-                "autotagger": true,
                 "textdomain": "jetpack-assets",
                 "mirror-repo": "Automattic/jetpack-assets",
                 "branch-alias": {
-                    "dev-trunk": "4.3.x-dev"
+                    "dev-trunk": "5.0.x-dev"
                 },
                 "changelogger": {
                     "link-template": "https://github.com/Automattic/jetpack-assets/compare/v${old}...v${new}"
@@ -221,9 +223,10 @@
             ],
             "description": "Asset management utilities for Jetpack ecosystem packages",
             "support": {
-                "source": "https://github.com/Automattic/jetpack-assets/tree/v4.3.11"
+                "source": "https://github.com/Automattic/jetpack-assets/tree/v5.0.19"
             },
-            "time": "2025-10-28T15:48:18+00:00"
+            "time": "2026-11-04T18:42:25+00:00",
+            "published-time": "2026-11-04T18:42:41+00:00"
         },
         {
             "name": "automattic/jetpack-autoloader",
@@ -371,32 +374,32 @@
         },
         {
             "name": "automattic/jetpack-connection",
-            "version": "v6.19.2",
+            "version": "v9.13.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/Automattic/jetpack-connection.git",
-                "reference": "74ac48945c6de0283fd1f4a52324a17d5e9c0b43"
+                "reference": "e3d20434de7f74d0b0a97d14eddece2608d692bb"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/Automattic/jetpack-connection/zipball/74ac48945c6de0283fd1f4a52324a17d5e9c0b43",
-                "reference": "74ac48945c6de0283fd1f4a52324a17d5e9c0b43",
+                "url": "https://api.github.com/repos/Automattic/jetpack-connection/zipball/e3d20434de7f74d0b0a97d14eddece2608d692bb",
+                "reference": "e3d20434de7f74d0b0a97d14eddece2608d692bb",
                 "shasum": ""
             },
             "require": {
-                "automattic/jetpack-a8c-mc-stats": "^3.0.5",
-                "automattic/jetpack-admin-ui": "^0.5.11",
-                "automattic/jetpack-assets": "^4.3.11",
-                "automattic/jetpack-constants": "^3.0.8",
-                "automattic/jetpack-redirect": "^3.0.9",
-                "automattic/jetpack-roles": "^3.0.8",
-                "automattic/jetpack-status": "^6.1.0",
-                "php": ">=7.2"
+                "automattic/jetpack-a8c-mc-stats": "^4.0.1",
+                "automattic/jetpack-admin-ui": "^0.14.8",
+                "automattic/jetpack-assets": "^5.0.14",
+                "automattic/jetpack-constants": "^4.0.1",
+                "automattic/jetpack-ip": "^0.7.1",
+                "automattic/jetpack-redirect": "^4.0.1",
+                "automattic/jetpack-roles": "^4.0.1",
+                "automattic/jetpack-status": "^7.1.1",
+                "php": ">=7.4"
             },
             "require-dev": {
-                "automattic/jetpack-changelogger": "^6.0.7",
-                "automattic/jetpack-test-environment": "@dev",
-                "automattic/phpunit-select-config": "^1.0.3",
+                "automattic/jetpack-wp-abilities": "^0.2.1",
+                "automattic/phpunit-select-config": "^1.0.12",
                 "brain/monkey": "^2.6.2",
                 "yoast/phpunit-polyfills": "^4.0.0"
             },
@@ -405,11 +408,10 @@
             },
             "type": "jetpack-library",
             "extra": {
-                "autotagger": true,
                 "textdomain": "jetpack-connection",
                 "mirror-repo": "Automattic/jetpack-connection",
                 "branch-alias": {
-                    "dev-trunk": "6.19.x-dev"
+                    "dev-trunk": "9.13.x-dev"
                 },
                 "changelogger": {
                     "link-template": "https://github.com/Automattic/jetpack-connection/compare/v${old}...v${new}"
@@ -441,30 +443,30 @@
             ],
             "description": "Everything needed to connect to the Jetpack infrastructure",
             "support": {
-                "source": "https://github.com/Automattic/jetpack-connection/tree/v6.19.2"
+                "source": "https://github.com/Automattic/jetpack-connection/tree/v9.13.0"
             },
-            "time": "2025-10-28T15:48:33+00:00"
+            "time": "2026-10-20T16:03:36+00:00",
+            "published-time": "2026-10-20T16:03:57+00:00"
         },
         {
             "name": "automattic/jetpack-constants",
-            "version": "v3.0.8",
+            "version": "v4.0.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/Automattic/jetpack-constants.git",
-                "reference": "f9bf00ab48956b8326209e7c0baf247a0ed721c4"
+                "reference": "bbdfe605759c4d7dfece63cb5545dfde2dd759f5"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/Automattic/jetpack-constants/zipball/f9bf00ab48956b8326209e7c0baf247a0ed721c4",
-                "reference": "f9bf00ab48956b8326209e7c0baf247a0ed721c4",
+                "url": "https://api.github.com/repos/Automattic/jetpack-constants/zipball/bbdfe605759c4d7dfece63cb5545dfde2dd759f5",
+                "reference": "bbdfe605759c4d7dfece63cb5545dfde2dd759f5",
                 "shasum": ""
             },
             "require": {
-                "php": ">=7.2"
+                "php": ">=7.4"
             },
             "require-dev": {
-                "automattic/jetpack-changelogger": "^6.0.5",
-                "automattic/phpunit-select-config": "^1.0.3",
+                "automattic/phpunit-select-config": "^1.0.12",
                 "brain/monkey": "^2.6.2",
                 "yoast/phpunit-polyfills": "^4.0.0"
             },
@@ -473,10 +475,9 @@
             },
             "type": "jetpack-library",
             "extra": {
-                "autotagger": true,
                 "mirror-repo": "Automattic/jetpack-constants",
                 "branch-alias": {
-                    "dev-trunk": "3.0.x-dev"
+                    "dev-trunk": "4.0.x-dev"
                 },
                 "changelogger": {
                     "link-template": "https://github.com/Automattic/jetpack-constants/compare/v${old}...v${new}"
@@ -493,31 +494,86 @@
             ],
             "description": "A wrapper for defining constants in a more testable way.",
             "support": {
-                "source": "https://github.com/Automattic/jetpack-constants/tree/v3.0.8"
+                "source": "https://github.com/Automattic/jetpack-constants/tree/v4.0.1"
             },
-            "time": "2025-04-28T15:12:45+00:00"
+            "time": "2026-10-20T16:01:54+00:00",
+            "published-time": "2026-10-20T16:02:09+00:00"
+        },
+        {
+            "name": "automattic/jetpack-ip",
+            "version": "v0.7.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/Automattic/jetpack-ip.git",
+                "reference": "e98b142d62d5566a8f29db8494a4dd65f14571fb"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/Automattic/jetpack-ip/zipball/e98b142d62d5566a8f29db8494a4dd65f14571fb",
+                "reference": "e98b142d62d5566a8f29db8494a4dd65f14571fb",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.4"
+            },
+            "require-dev": {
+                "automattic/phpunit-select-config": "^1.0.12",
+                "brain/monkey": "^2.6.2",
+                "yoast/phpunit-polyfills": "^4.0.0"
+            },
+            "suggest": {
+                "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package."
+            },
+            "type": "jetpack-library",
+            "extra": {
+                "textdomain": "jetpack-ip",
+                "mirror-repo": "Automattic/jetpack-ip",
+                "branch-alias": {
+                    "dev-trunk": "0.7.x-dev"
+                },
+                "changelogger": {
+                    "link-template": "https://github.com/automattic/jetpack-ip/compare/v${old}...v${new}"
+                },
+                "version-constants": {
+                    "::PACKAGE_VERSION": "src/class-utils.php"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "GPL-2.0-or-later"
+            ],
+            "description": "Utilities for working with IP addresses.",
+            "support": {
+                "source": "https://github.com/Automattic/jetpack-ip/tree/v0.7.1"
+            },
+            "time": "2026-10-20T16:02:03+00:00",
+            "published-time": "2026-10-20T16:02:17+00:00"
         },
         {
             "name": "automattic/jetpack-redirect",
-            "version": "v3.0.9",
+            "version": "v4.0.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/Automattic/jetpack-redirect.git",
-                "reference": "afb74d7c2ae46863c2af46b5703cf1c8728e6a5d"
+                "reference": "5ebd8704a99ce6f1266a63575f50d881974f11a1"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/Automattic/jetpack-redirect/zipball/afb74d7c2ae46863c2af46b5703cf1c8728e6a5d",
-                "reference": "afb74d7c2ae46863c2af46b5703cf1c8728e6a5d",
+                "url": "https://api.github.com/repos/Automattic/jetpack-redirect/zipball/5ebd8704a99ce6f1266a63575f50d881974f11a1",
+                "reference": "5ebd8704a99ce6f1266a63575f50d881974f11a1",
                 "shasum": ""
             },
             "require": {
-                "automattic/jetpack-status": "^6.0.3",
-                "php": ">=7.2"
+                "automattic/jetpack-status": "^7.1.1",
+                "php": ">=7.4"
             },
             "require-dev": {
-                "automattic/jetpack-changelogger": "^6.0.6",
-                "automattic/phpunit-select-config": "^1.0.3",
+                "automattic/phpunit-select-config": "^1.0.12",
                 "brain/monkey": "^2.6.2",
                 "yoast/phpunit-polyfills": "^4.0.0"
             },
@@ -526,10 +582,9 @@
             },
             "type": "jetpack-library",
             "extra": {
-                "autotagger": true,
                 "mirror-repo": "Automattic/jetpack-redirect",
                 "branch-alias": {
-                    "dev-trunk": "3.0.x-dev"
+                    "dev-trunk": "4.0.x-dev"
                 },
                 "changelogger": {
                     "link-template": "https://github.com/Automattic/jetpack-redirect/compare/v${old}...v${new}"
@@ -546,30 +601,30 @@
             ],
             "description": "Utilities to build URLs to the jetpack.com/redirect/ service",
             "support": {
-                "source": "https://github.com/Automattic/jetpack-redirect/tree/v3.0.9"
+                "source": "https://github.com/Automattic/jetpack-redirect/tree/v4.0.1"
             },
-            "time": "2025-08-25T05:54:15+00:00"
+            "time": "2026-10-20T16:02:47+00:00",
+            "published-time": "2026-10-20T16:03:02+00:00"
         },
         {
             "name": "automattic/jetpack-roles",
-            "version": "v3.0.8",
+            "version": "v4.0.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/Automattic/jetpack-roles.git",
-                "reference": "96e09fc813ccf5e691f46297875d6b85b859c669"
+                "reference": "e6d5b4891e5eb83433123c3c60a752ede1821a89"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/Automattic/jetpack-roles/zipball/96e09fc813ccf5e691f46297875d6b85b859c669",
-                "reference": "96e09fc813ccf5e691f46297875d6b85b859c669",
+                "url": "https://api.github.com/repos/Automattic/jetpack-roles/zipball/e6d5b4891e5eb83433123c3c60a752ede1821a89",
+                "reference": "e6d5b4891e5eb83433123c3c60a752ede1821a89",
                 "shasum": ""
             },
             "require": {
-                "php": ">=7.2"
+                "php": ">=7.4"
             },
             "require-dev": {
-                "automattic/jetpack-changelogger": "^6.0.5",
-                "automattic/phpunit-select-config": "^1.0.3",
+                "automattic/phpunit-select-config": "^1.0.12",
                 "brain/monkey": "^2.6.2",
                 "yoast/phpunit-polyfills": "^4.0.0"
             },
@@ -578,10 +633,9 @@
             },
             "type": "jetpack-library",
             "extra": {
-                "autotagger": true,
                 "mirror-repo": "Automattic/jetpack-roles",
                 "branch-alias": {
-                    "dev-trunk": "3.0.x-dev"
+                    "dev-trunk": "4.0.x-dev"
                 },
                 "changelogger": {
                     "link-template": "https://github.com/Automattic/jetpack-roles/compare/v${old}...v${new}"
@@ -598,34 +652,32 @@
             ],
             "description": "Utilities, related with user roles and capabilities.",
             "support": {
-                "source": "https://github.com/Automattic/jetpack-roles/tree/v3.0.8"
+                "source": "https://github.com/Automattic/jetpack-roles/tree/v4.0.1"
             },
-            "time": "2025-04-28T15:12:44+00:00"
+            "time": "2026-10-20T16:02:14+00:00",
+            "published-time": "2026-10-20T16:02:26+00:00"
         },
         {
             "name": "automattic/jetpack-status",
-            "version": "v6.1.0",
+            "version": "v7.1.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/Automattic/jetpack-status.git",
-                "reference": "7dbcfff7f1005611a3d27e3553df9389c658b3a8"
+                "reference": "d5a860d3e13ab606d57625df0922b15d94454874"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/Automattic/jetpack-status/zipball/7dbcfff7f1005611a3d27e3553df9389c658b3a8",
-                "reference": "7dbcfff7f1005611a3d27e3553df9389c658b3a8",
+                "url": "https://api.github.com/repos/Automattic/jetpack-status/zipball/d5a860d3e13ab606d57625df0922b15d94454874",
+                "reference": "d5a860d3e13ab606d57625df0922b15d94454874",
                 "shasum": ""
             },
             "require": {
-                "automattic/jetpack-constants": "^3.0.8",
-                "php": ">=7.2"
+                "automattic/jetpack-constants": "^4.0.1",
+                "automattic/jetpack-ip": "^0.7.1",
+                "php": ">=7.4"
             },
             "require-dev": {
-                "automattic/jetpack-changelogger": "^6.0.7",
-                "automattic/jetpack-connection": "@dev",
-                "automattic/jetpack-ip": "^0.4.10",
-                "automattic/jetpack-plans": "@dev",
-                "automattic/phpunit-select-config": "^1.0.3",
+                "automattic/phpunit-select-config": "^1.0.12",
                 "brain/monkey": "^2.6.2",
                 "yoast/phpunit-polyfills": "^4.0.0"
             },
@@ -634,10 +686,9 @@
             },
             "type": "jetpack-library",
             "extra": {
-                "autotagger": true,
                 "mirror-repo": "Automattic/jetpack-status",
                 "branch-alias": {
-                    "dev-trunk": "6.1.x-dev"
+                    "dev-trunk": "7.1.x-dev"
                 },
                 "changelogger": {
                     "link-template": "https://github.com/Automattic/jetpack-status/compare/v${old}...v${new}"
@@ -660,9 +711,10 @@
             ],
             "description": "Used to retrieve information about the current status of Jetpack and the site overall.",
             "support": {
-                "source": "https://github.com/Automattic/jetpack-status/tree/v6.1.0"
+                "source": "https://github.com/Automattic/jetpack-status/tree/v7.1.1"
             },
-            "time": "2025-10-13T20:12:54+00:00"
+            "time": "2026-10-20T16:02:30+00:00",
+            "published-time": "2026-10-20T16:02:45+00:00"
         },
         {
             "name": "automattic/tracks-shared-utils",
diff --git a/plugins/woocommerce/includes/gateways/paypal/class-wc-gateway-paypal.php b/plugins/woocommerce/includes/gateways/paypal/class-wc-gateway-paypal.php
index 7a25f374097..530d403cfed 100644
--- a/plugins/woocommerce/includes/gateways/paypal/class-wc-gateway-paypal.php
+++ b/plugins/woocommerce/includes/gateways/paypal/class-wc-gateway-paypal.php
@@ -302,6 +302,17 @@ class WC_Gateway_Paypal extends WC_Payment_Gateway {
 	 * @return void
 	 */
 	public function maybe_onboard_with_transact() {
+		$this->onboard_with_transact( false );
+	}
+
+	/**
+	 * Onboard the merchant with the Transact platform when PayPal Standard is enabled and uses Orders v2.
+	 *
+	 * @param bool $force Whether the merchant asked for it. See TransactAccountManager::do_onboarding().
+	 *
+	 * @return void
+	 */
+	private function onboard_with_transact( bool $force ): void {
 		if ( ! is_admin() || ! current_user_can( 'manage_woocommerce' ) ) {
 			return;
 		}
@@ -330,7 +341,7 @@ class WC_Gateway_Paypal extends WC_Payment_Gateway {
 		}

 		$transact_account_manager = new PayPalTransactAccountManager( $this );
-		$transact_account_manager->do_onboarding();
+		$transact_account_manager->do_onboarding( $force );
 	}

 	/**
@@ -404,9 +415,18 @@ class WC_Gateway_Paypal extends WC_Payment_Gateway {
 			}
 		}

-		// Trigger Transact onboarding when settings are saved.
+		// Trigger Transact onboarding when settings are saved. The merchant asked for this, so registration is forced
+		// past the Jetpack connection package's backoff.
 		if ( $saved ) {
-			$this->maybe_onboard_with_transact();
+			// The parent read the settings before writing the posted values, and the constructor read the email and test mode.
+			// Onboarding uses all three, so reload them: otherwise disabling PayPal would onboard, and enabling would not.
+			$this->init_settings();
+			if ( ! $this->is_valid_for_use() ) {
+				$this->enabled = 'no';
+			}
+			$this->email    = $this->get_option( 'email' );
+			$this->testmode = 'yes' === $this->get_option( 'testmode', 'no' );
+			$this->onboard_with_transact( true );
 		}

 		return $saved;
diff --git a/plugins/woocommerce/phpstan-baseline.neon b/plugins/woocommerce/phpstan-baseline.neon
index 5783c1548fd..b1cdc2c92b7 100644
--- a/plugins/woocommerce/phpstan-baseline.neon
+++ b/plugins/woocommerce/phpstan-baseline.neon
@@ -37487,12 +37487,6 @@ parameters:
 			count: 1
 			path: src/Admin/API/OnboardingProfile.php

-		-
-			message: '#^Cannot access offset ''email'' on array\|bool\.$#'
-			identifier: offsetAccess.nonOffsetAccessible
-			count: 1
-			path: src/Admin/API/OnboardingProfile.php
-
 		-
 			message: '#^Method Automattic\\WooCommerce\\Admin\\API\\OnboardingProfile\:\:core_profiler_step_complete\(\) has parameter \$request with generic class WP_REST_Request but does not specify its types\: T$#'
 			identifier: missingType.generics
diff --git a/plugins/woocommerce/src/Admin/API/OnboardingPlugins.php b/plugins/woocommerce/src/Admin/API/OnboardingPlugins.php
index f528844edc5..413004bfa97 100644
--- a/plugins/woocommerce/src/Admin/API/OnboardingPlugins.php
+++ b/plugins/woocommerce/src/Admin/API/OnboardingPlugins.php
@@ -125,6 +125,12 @@ class OnboardingPlugins extends WC_REST_Data_Controller {
 							'required'          => false,
 							'default'           => 'woocommerce-onboarding',
 						),
+						'force'        => array(
+							'description' => 'Whether the merchant asked to connect. Registration then runs even in offline mode and without waiting after an earlier failure, including any Retry-After window.',
+							'type'        => 'boolean',
+							'required'    => false,
+							'default'     => false,
+						),
 					),
 				),
 			)
@@ -230,7 +236,8 @@ class OnboardingPlugins extends WC_REST_Data_Controller {
 	public function get_jetpack_authorization_url( WP_REST_Request $request ) {
 		return JetpackConnection::get_authorization_url(
 			$request->get_param( 'redirect_url' ),
-			$request->get_param( 'from' )
+			$request->get_param( 'from' ),
+			true === $request->get_param( 'force' )
 		);
 	}

diff --git a/plugins/woocommerce/src/Admin/API/OnboardingProfile.php b/plugins/woocommerce/src/Admin/API/OnboardingProfile.php
index 8c96db1608f..a04f0de01b3 100644
--- a/plugins/woocommerce/src/Admin/API/OnboardingProfile.php
+++ b/plugins/woocommerce/src/Admin/API/OnboardingProfile.php
@@ -269,7 +269,10 @@ class OnboardingProfile extends \WC_REST_Data_Controller {
 			if ( $jetpack_connection_manager->is_active() ) {
 				$jetpack_user = $jetpack_connection_manager->get_connected_user_data();

-				$result['email'] = $jetpack_user['email'];
+				// Not an array when the WordPress.com fetch failed: false, or an older Jetpack connection package's cached 'error'.
+				if ( is_array( $jetpack_user ) && ! empty( $jetpack_user['email'] ) ) {
+					$result['email'] = $jetpack_user['email'];
+				}
 			}
 		}

diff --git a/plugins/woocommerce/src/Gateways/PayPal/TransactAccountManager.php b/plugins/woocommerce/src/Gateways/PayPal/TransactAccountManager.php
index aca501cfdb7..2e102625acf 100644
--- a/plugins/woocommerce/src/Gateways/PayPal/TransactAccountManager.php
+++ b/plugins/woocommerce/src/Gateways/PayPal/TransactAccountManager.php
@@ -101,11 +101,17 @@ final class TransactAccountManager {
 	/**
 	 * Onboard the merchant with the Transact platform.
 	 *
+	 * Pass `$force` only when the merchant asked for it. It makes the Jetpack connection package register
+	 * even in offline mode and without waiting after an earlier failed registration.
+	 *
+	 * @param bool $force Whether the merchant asked to set up PayPal.
+	 *
 	 * @return void
 	 *
 	 * @since 10.5.0
+	 * @since 11.4.0 Added the `$force` parameter.
 	 */
-	public function do_onboarding(): void {
+	public function do_onboarding( bool $force = false ): void {
 		// Check that we have a PayPal email. This is required for processing payments --
 		// used as the payee email. Only begin onboarding if this minimum requirement is met.
 		if ( empty( $this->gateway->email ) ) {
@@ -120,7 +126,7 @@ final class TransactAccountManager {
 		}

 		if ( ! $jetpack_connection_manager->is_connected() ) {
-			$result = $jetpack_connection_manager->try_registration();
+			$result = $jetpack_connection_manager->try_registration( true, $force );
 			if ( is_wp_error( $result ) ) {
 				\WC_Gateway_Paypal::log( 'Jetpack registration failed: ' . $result->get_error_message(), 'error' );
 				return;
diff --git a/plugins/woocommerce/src/Internal/AgentReadiness/AgenticCommerceSettings.php b/plugins/woocommerce/src/Internal/AgentReadiness/AgenticCommerceSettings.php
index a20bd6aff8b..6f9797471de 100644
--- a/plugins/woocommerce/src/Internal/AgentReadiness/AgenticCommerceSettings.php
+++ b/plugins/woocommerce/src/Internal/AgentReadiness/AgenticCommerceSettings.php
@@ -139,11 +139,13 @@ class AgenticCommerceSettings implements RegisterHooksInterface {
 	 * Where Connect to WordPress.com goes: the authorization URL, or back to the Overview with an error
 	 * when the site can't be registered or that URL is not https on WordPress.com.
 	 *
+	 * Only a Connect click reaches this, so registration is forced past the connection package's backoff.
+	 *
 	 * @since 11.4.0
 	 */
 	public static function connect_redirect(): string {
 		self::ensure_jetpack_activation_source();
-		$result    = JetpackConnection::get_authorization_url( add_query_arg( self::CONNECT_RESULT, 'connected', self::url() ), 'woocommerce-core-profiler' );
+		$result    = JetpackConnection::get_authorization_url( add_query_arg( self::CONNECT_RESULT, 'connected', self::url() ), 'woocommerce-core-profiler', true );
 		$candidate = ! empty( $result['success'] ) && is_string( $result['url'] ?? null ) ? $result['url'] : '';
 		$url       = self::wordpress_com_https_url( $candidate );
 		return '' !== $url ? $url : add_query_arg( self::CONNECT_RESULT, 'error', self::url() );
diff --git a/plugins/woocommerce/src/Internal/Jetpack/JetpackConnection.php b/plugins/woocommerce/src/Internal/Jetpack/JetpackConnection.php
index ff27f07f1e9..f2a4e34ab43 100644
--- a/plugins/woocommerce/src/Internal/Jetpack/JetpackConnection.php
+++ b/plugins/woocommerce/src/Internal/Jetpack/JetpackConnection.php
@@ -35,8 +35,15 @@ class JetpackConnection {
 	/**
 	 * Get the authorization URL for the Jetpack connection.
 	 *
+	 * Pass `$force` only when a merchant asked to connect. It makes the Jetpack connection package
+	 * register even in offline mode and without waiting after an earlier failed registration,
+	 * including any Retry-After window WordPress.com asked for. Older package versions ignore it.
+	 *
 	 * @param mixed  $redirect_url Redirect URL.
 	 * @param string $from         From parameter.
+	 * @param bool   $force        Whether the merchant asked to connect.
+	 *
+	 * @since 11.4.0 Added the `$force` parameter.
 	 *
 	 * @return array {
 	 *     Authorization data.
@@ -47,13 +54,13 @@ class JetpackConnection {
 	 *     @type string $url          The authorization URL.
 	 * }
 	 */
-	public static function get_authorization_url( $redirect_url, $from = '' ) {
+	public static function get_authorization_url( $redirect_url, $from = '', bool $force = false ) {
 		$manager = self::get_manager();
 		$errors  = new WP_Error();

 		// Register the site to wp.com.
 		if ( ! $manager->is_connected() ) {
-			$result = $manager->try_registration();
+			$result = $manager->try_registration( true, $force );
 			if ( is_wp_error( $result ) ) {
 				$errors->add( $result->get_error_code(), $result->get_error_message() );
 			}
diff --git a/plugins/woocommerce/tests/legacy/bootstrap.php b/plugins/woocommerce/tests/legacy/bootstrap.php
index 4bb0b2b5850..ec4197f9f4a 100644
--- a/plugins/woocommerce/tests/legacy/bootstrap.php
+++ b/plugins/woocommerce/tests/legacy/bootstrap.php
@@ -376,6 +376,7 @@ class WC_Unit_Tests_Bootstrap {
 		require_once dirname( $this->tests_dir ) . '/php/helpers/CorePayPalGatewayTrait.php';
 		require_once dirname( $this->tests_dir ) . '/php/helpers/ImageAttachmentTrait.php';
 		require_once dirname( $this->tests_dir ) . '/php/helpers/InterleavedStatusOrdersTrait.php';
+		require_once dirname( $this->tests_dir ) . '/php/helpers/JetpackConnectionManagerTrait.php';
 	}

 	/**
diff --git a/plugins/woocommerce/tests/php/helpers/JetpackConnectionManagerTrait.php b/plugins/woocommerce/tests/php/helpers/JetpackConnectionManagerTrait.php
new file mode 100644
index 00000000000..3456f91773f
--- /dev/null
+++ b/plugins/woocommerce/tests/php/helpers/JetpackConnectionManagerTrait.php
@@ -0,0 +1,60 @@
+<?php
+/**
+ * JetpackConnectionManagerTrait file.
+ */
+
+declare( strict_types = 1 );
+
+namespace Automattic\WooCommerce\Tests\Helpers;
+
+use Automattic\Jetpack\Connection\Manager;
+use Automattic\WooCommerce\Internal\Jetpack\JetpackConnection;
+
+/**
+ * Replaces the connection manager JetpackConnection caches with a mock that records registration attempts.
+ *
+ * JetpackConnection keeps the manager in a static property that no base test class resets, so a test
+ * class using this trait calls reset_jetpack_connection_manager() from its tearDown().
+ */
+trait JetpackConnectionManagerTrait {
+
+	/**
+	 * Make JetpackConnection use a manager mock that records try_registration() calls.
+	 *
+	 * @param bool $is_connected Whether the site is already registered.
+	 * @return \ArrayObject<int, array<int, mixed>> The arguments of each try_registration() call.
+	 */
+	private function use_recording_jetpack_connection_manager( bool $is_connected = false ): \ArrayObject {
+		$calls   = new \ArrayObject();
+		$manager = $this->createMock( Manager::class );
+		$manager->method( 'is_connected' )->willReturn( $is_connected );
+		$manager->method( 'get_authorization_url' )->willReturn( 'https://jetpack.wordpress.com/jetpack.authorize/1/?client_id=1' );
+		$manager->method( 'try_registration' )->willReturnCallback(
+			static function ( ...$args ) use ( $calls ) {
+				$calls[] = $args;
+				return true;
+			}
+		);
+		$this->set_jetpack_connection_manager( $manager );
+
+		return $calls;
+	}
+
+	/**
+	 * Let JetpackConnection create its own manager again.
+	 */
+	private function reset_jetpack_connection_manager(): void {
+		$this->set_jetpack_connection_manager( null );
+	}
+
+	/**
+	 * Replace the manager JetpackConnection caches.
+	 *
+	 * @param Manager|null $manager Manager to use, or null to reset.
+	 */
+	private function set_jetpack_connection_manager( ?Manager $manager ): void {
+		$property = new \ReflectionProperty( JetpackConnection::class, 'manager' );
+		$property->setAccessible( true );
+		$property->setValue( null, $manager );
+	}
+}
diff --git a/plugins/woocommerce/tests/php/includes/gateways/paypal/class-wc-gateway-paypal-test.php b/plugins/woocommerce/tests/php/includes/gateways/paypal/class-wc-gateway-paypal-test.php
index f7a484cf614..476dd02717c 100644
--- a/plugins/woocommerce/tests/php/includes/gateways/paypal/class-wc-gateway-paypal-test.php
+++ b/plugins/woocommerce/tests/php/includes/gateways/paypal/class-wc-gateway-paypal-test.php
@@ -302,4 +302,78 @@ class WC_Gateway_Paypal_Test extends \WC_Unit_Test_Case {
 			),
 		);
 	}
+
+	/**
+	 * @testdox Transact onboarding on a settings save uses the saved values and forces registration; after an update it does not force.
+	 *
+	 * @dataProvider provider_transact_onboarding_triggers
+	 *
+	 * @param array      $stored   PayPal Standard settings before the trigger.
+	 * @param array|null $posted   Settings the merchant saves, or null for the onboarding after an update.
+	 * @param array      $expected The arguments of each registration attempt.
+	 */
+	public function test_transact_onboarding_registration( array $stored, ?array $posted, array $expected ): void {
+		update_option( 'woocommerce_paypal_settings', array_merge( array( 'invoice_prefix' => 'WC-' ), $stored ) );
+		add_filter( 'woocommerce_paypal_use_orders_v2', '__return_true' );
+		wp_set_current_user( $this->factory->user->create( array( 'role' => 'administrator' ) ) );
+		set_current_screen( 'woocommerce_page_wc-settings' );
+
+		$calls   = new \ArrayObject();
+		$manager = $this->createMock( \Automattic\Jetpack\Connection\Manager::class );
+		$manager->method( 'is_connected' )->willReturn( false );
+		// A failed registration stops the onboarding before it calls the Transact API.
+		$manager->method( 'try_registration' )->willReturnCallback(
+			static function ( ...$args ) use ( $calls ) {
+				$calls[] = $args;
+				return new \WP_Error( 'registration_failed', 'Registration failed' );
+			}
+		);
+		$gateway = $this->getMockBuilder( WC_Gateway_Paypal::class )
+			->onlyMethods( array( 'get_jetpack_connection_manager' ) )
+			->getMock();
+		$gateway->method( 'get_jetpack_connection_manager' )->willReturn( $manager );
+
+		try {
+			if ( null !== $posted ) {
+				$gateway->set_post_data( array_merge( array( 'woocommerce_paypal_invoice_prefix' => 'WCB-' ), $posted ) );
+				$this->assertTrue( $gateway->process_admin_options(), 'The changed settings should be saved.' );
+				$this->assertSame( isset( $posted['woocommerce_paypal_testmode'] ), $gateway->testmode, 'Onboarding should use the saved test mode.' );
+			} else {
+				$gateway->maybe_onboard_with_transact();
+			}
+		} finally {
+			set_current_screen( 'front' );
+			wp_set_current_user( 0 );
+		}
+
+		$this->assertSame( $expected, $calls->getArrayCopy(), 'Registration should be attempted as expected.' );
+	}
+
+	/**
+	 * Triggers of the Transact onboarding and the registration attempts they should make.
+	 *
+	 * @return array<string, array{0: array, 1: array|null, 2: array}>
+	 */
+	public function provider_transact_onboarding_triggers(): array {
+		$enabled  = array(
+			'enabled' => 'yes',
+			'email'   => 'merchant@example.com',
+		);
+		$disabled = array(
+			'enabled' => 'no',
+			'email'   => '',
+		);
+		$save     = array(
+			'woocommerce_paypal_enabled'  => '1',
+			'woocommerce_paypal_email'    => 'merchant@example.com',
+			'woocommerce_paypal_testmode' => '1',
+		);
+
+		return array(
+			'saving while enabled'           => array( $enabled, $save, array( array( true, true ) ) ),
+			'enabling with a new email'      => array( $disabled, $save, array( array( true, true ) ) ),
+			'disabling'                      => array( $enabled, array( 'woocommerce_paypal_email' => 'merchant@example.com' ), array() ),
+			'the onboarding after an update' => array( $enabled, null, array( array( true, false ) ) ),
+		);
+	}
 }
diff --git a/plugins/woocommerce/tests/php/src/Admin/API/OnboardingPluginsTest.php b/plugins/woocommerce/tests/php/src/Admin/API/OnboardingPluginsTest.php
index 142b94d3e12..6965a20e886 100644
--- a/plugins/woocommerce/tests/php/src/Admin/API/OnboardingPluginsTest.php
+++ b/plugins/woocommerce/tests/php/src/Admin/API/OnboardingPluginsTest.php
@@ -7,6 +7,7 @@

 namespace Automattic\WooCommerce\Tests\Admin\API;

+use Automattic\WooCommerce\Tests\Helpers\JetpackConnectionManagerTrait;
 use WC_REST_Unit_Test_Case;
 use WP_REST_Request;

@@ -16,6 +17,8 @@ use WP_REST_Request;
  * @class OnboardingPluginsTest.
  */
 class OnboardingPluginsTest extends WC_REST_Unit_Test_Case {
+	use JetpackConnectionManagerTrait;
+
 	/**
 	 * Endpoint.
 	 *
@@ -35,9 +38,12 @@ class OnboardingPluginsTest extends WC_REST_Unit_Test_Case {
 	 * Tear down.
 	 */
 	public function tearDown(): void {
-		unset( $GLOBALS['wp_rest_auth_cookie'] );
-
-		parent::tearDown();
+		try {
+			unset( $GLOBALS['wp_rest_auth_cookie'] );
+			$this->reset_jetpack_connection_manager();
+		} finally {
+			parent::tearDown();
+		}
 	}

 	/**
@@ -257,6 +263,33 @@ class OnboardingPluginsTest extends WC_REST_Unit_Test_Case {
 		$this->assertArrayHasKey( 'url', $response->get_data() );
 	}

+	/**
+	 * @testdox The Jetpack authorization URL endpoint forces registration only when the request asks for it.
+	 *
+	 * @testWith [null, false]
+	 *           ["true", true]
+	 *           ["false", false]
+	 *
+	 * @param string|null $force    Raw `force` query value, or null to leave it out.
+	 * @param bool        $expected Whether registration should be forced.
+	 * @return void
+	 */
+	public function test_jetpack_authorization_url_passes_force_to_registration( $force, $expected ) {
+		$calls = $this->use_recording_jetpack_connection_manager();
+
+		$request = new WP_REST_Request( 'GET', self::ENDPOINT . '/jetpack-authorization-url' );
+		$request->set_param( 'redirect_url', 'https://example.com' );
+		if ( null !== $force ) {
+			$request->set_param( 'force', $force );
+		}
+		$this->add_rest_nonce( $request );
+
+		$response = $this->server->dispatch( $request );
+
+		$this->assertSame( 200, $response->get_status(), 'The request should succeed.' );
+		$this->assertSame( array( array( true, $expected ) ), $calls->getArrayCopy(), 'Registration should be attempted once with the expected force flag.' );
+	}
+
 	/**
 	 * Authenticate the current user through a `logged_in` cookie, as core does
 	 * for a browser request, and attach the matching `wp_rest` nonce header.
diff --git a/plugins/woocommerce/tests/php/src/Admin/API/OnboardingProfileTest.php b/plugins/woocommerce/tests/php/src/Admin/API/OnboardingProfileTest.php
index eb07b7ac382..f2f3e0871b9 100644
--- a/plugins/woocommerce/tests/php/src/Admin/API/OnboardingProfileTest.php
+++ b/plugins/woocommerce/tests/php/src/Admin/API/OnboardingProfileTest.php
@@ -174,4 +174,49 @@ class OnboardingProfileTest extends WC_REST_Unit_Test_Case {
 			update_option( $field, $value );
 		}
 	}
+
+	/**
+	 * @testdox The email prefill uses the WordPress.com email when the connected user data has one, and the site admin email otherwise.
+	 *
+	 * @dataProvider provider_cached_connected_user_data
+	 *
+	 * @param mixed  $cached_user_data What the Jetpack connection package cached for the current user.
+	 * @param string $expected_source  'wpcom' for the cached WordPress.com email, 'admin' for the site admin email.
+	 * @return void
+	 */
+	public function test_email_prefill_handles_cached_connected_user_data( $cached_user_data, string $expected_source ) {
+		$user_id = get_current_user_id();
+		\Jetpack_Options::update_options(
+			array(
+				'id'          => 1234,
+				'master_user' => $user_id,
+				'blog_token'  => 'blogkey.blogsecret',
+				'user_tokens' => array( $user_id => "userkey.usersecret.{$user_id}" ),
+			)
+		);
+		set_transient( "jetpack_connected_user_data_{$user_id}", $cached_user_data, MINUTE_IN_SECONDS );
+
+		$response = $this->server->dispatch( new WP_REST_Request( 'GET', self::ENDPOINT . '/experimental_get_email_prefill' ) );
+
+		$this->assertSame( 200, $response->get_status(), 'The prefill should not fail on cached connection data.' );
+		$this->assertSame(
+			'wpcom' === $expected_source ? 'merchant@wordpress-com.test' : get_option( 'admin_email' ),
+			$response->get_data()['email'],
+			'The prefill should use the WordPress.com email only when the cached user data has one.'
+		);
+	}
+
+	/**
+	 * Cached connected user data and the email source the prefill should use.
+	 *
+	 * @return array<string, array{0: mixed, 1: string}>
+	 */
+	public function provider_cached_connected_user_data(): array {
+		return array(
+			// The bundled 9.x package returns false for a cached 'error'. Older copies return the string itself, which this case can't reach.
+			'cached fetch failure' => array( 'error', 'admin' ),
+			'no email'             => array( array( 'ID' => 1 ), 'admin' ),
+			'WordPress.com email'  => array( array( 'email' => 'merchant@wordpress-com.test' ), 'wpcom' ),
+		);
+	}
 }
diff --git a/plugins/woocommerce/tests/php/src/Internal/AgentReadiness/AgenticCommerceSettingsTest.php b/plugins/woocommerce/tests/php/src/Internal/AgentReadiness/AgenticCommerceSettingsTest.php
index a69247863c5..78cde18ed70 100644
--- a/plugins/woocommerce/tests/php/src/Internal/AgentReadiness/AgenticCommerceSettingsTest.php
+++ b/plugins/woocommerce/tests/php/src/Internal/AgentReadiness/AgenticCommerceSettingsTest.php
@@ -14,6 +14,7 @@ use Automattic\WooCommerce\Internal\AgentReadiness\RemoteRules;
 use Automattic\WooCommerce\Internal\AgentReadiness\ScheduledScan;
 use Automattic\WooCommerce\Internal\AgentReadiness\StoreConditions;
 use Automattic\WooCommerce\Internal\AgentReadiness\SupportReport;
+use Automattic\WooCommerce\Tests\Helpers\JetpackConnectionManagerTrait;
 use WC_Admin_Settings;
 use WC_Helper_Product;
 use WC_Unit_Test_Case;
@@ -22,6 +23,7 @@ use WC_Unit_Test_Case;
  * Tests for the Agentic commerce settings tab.
  */
 class AgenticCommerceSettingsTest extends WC_Unit_Test_Case {
+	use JetpackConnectionManagerTrait;

 	/**
 	 * The System Under Test.
@@ -62,6 +64,7 @@ class AgenticCommerceSettingsTest extends WC_Unit_Test_Case {
 	public function tearDown(): void {
 		try {
 			set_current_screen( 'front' );
+			$this->reset_jetpack_connection_manager();
 			foreach ( array_reverse( $this->restore ) as $item ) {
 				$item[0]->enabled = $item[1];
 			}
@@ -203,6 +206,31 @@ class AgenticCommerceSettingsTest extends WC_Unit_Test_Case {
 		$this->assertSame( array( 'woocommerce', 'ai-tools' ), get_option( 'jetpack_activation_source' ) );
 	}

+	/**
+	 * @testdox Clicking Connect forces WordPress.com registration past the connection package's backoff.
+	 */
+	public function test_connect_action_forces_registration(): void {
+		$calls                = $this->use_recording_jetpack_connection_manager();
+		$_REQUEST['_wpnonce'] = wp_create_nonce( AgenticCommerceSettings::CONNECT_ACTION );
+		// handle_connect() exits after redirecting; stop it at the redirect instead.
+		add_filter(
+			'wp_redirect',
+			static function () {
+				throw new \RuntimeException( 'redirected' );
+			}
+		);
+		try {
+			$this->sut->handle_connect();
+			$this->fail( 'The connect action should redirect.' );
+		} catch ( \RuntimeException $e ) {
+			$this->assertSame( 'redirected', $e->getMessage() );
+		} finally {
+			unset( $_REQUEST['_wpnonce'] );
+		}
+
+		$this->assertSame( array( array( true, true ) ), $calls->getArrayCopy(), 'The connect click should register once, forced.' );
+	}
+
 	/**
 	 * @testdox An activation source Jetpack already stored is left as it is.
 	 */
diff --git a/plugins/woocommerce/tests/php/src/Internal/Jetpack/JetpackConnectionTest.php b/plugins/woocommerce/tests/php/src/Internal/Jetpack/JetpackConnectionTest.php
new file mode 100644
index 00000000000..d95f9620db7
--- /dev/null
+++ b/plugins/woocommerce/tests/php/src/Internal/Jetpack/JetpackConnectionTest.php
@@ -0,0 +1,54 @@
+<?php
+declare( strict_types = 1 );
+
+namespace Automattic\WooCommerce\Tests\Internal\Jetpack;
+
+use Automattic\WooCommerce\Internal\Jetpack\JetpackConnection;
+use Automattic\WooCommerce\Tests\Helpers\JetpackConnectionManagerTrait;
+use WC_Unit_Test_Case;
+
+/**
+ * Tests for the JetpackConnection class.
+ */
+class JetpackConnectionTest extends WC_Unit_Test_Case {
+	use JetpackConnectionManagerTrait;
+
+	/**
+	 * Tear down test fixtures.
+	 */
+	public function tearDown(): void {
+		try {
+			$this->reset_jetpack_connection_manager();
+		} finally {
+			parent::tearDown();
+		}
+	}
+
+	/**
+	 * @testdox Should force registration of an unconnected site only when asked to.
+	 *
+	 * @testWith [[true], true]
+	 *           [[], false]
+	 *
+	 * @param array $force_arg The force argument, or none to use the default.
+	 * @param bool  $expected  Whether registration should be forced.
+	 */
+	public function test_get_authorization_url_forces_registration_only_when_asked( array $force_arg, bool $expected ): void {
+		$calls = $this->use_recording_jetpack_connection_manager();
+
+		JetpackConnection::get_authorization_url( 'https://example.com/wp-admin/', 'woocommerce-core-profiler', ...$force_arg );
+
+		$this->assertSame( array( array( true, $expected ) ), $calls->getArrayCopy(), 'Registration should be attempted once with the expected force flag.' );
+	}
+
+	/**
+	 * @testdox Should not attempt registration when the site is already connected.
+	 */
+	public function test_get_authorization_url_skips_registration_when_connected(): void {
+		$calls = $this->use_recording_jetpack_connection_manager( true );
+
+		JetpackConnection::get_authorization_url( 'https://example.com/wp-admin/', '', true );
+
+		$this->assertSame( array(), $calls->getArrayCopy(), 'A connected site should not register again.' );
+	}
+}