Skip to content

Commit

Permalink
My Jetpack: point to right redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
IanRamosC committed Nov 1, 2024
1 parent bca6d64 commit 9406561
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,14 @@ const ConnectionStep = ( {
const { recordEvent } = useAnalytics();
const { setNotice, resetNotice } = useContext( NoticeContext );

const { siteUrl, adminUrl } = getMyJetpackWindowInitialState();
const { siteSuffix, siteUrl, adminUrl } = getMyJetpackWindowInitialState();
const redirectUri = `?redirect_uri=${ encodeURIComponent( window.location.href ) }`;
const connectAfterCheckoutUrl = `&connect_after_checkout=true&from_site_slug=${ siteUrl }&admin_url=${ adminUrl }`;
const query = `${ redirectUri }${ connectAfterCheckoutUrl }`;
const jetpackPlansPath = getRedirectUrl( 'jetpack-nav-plans-no-site', { query } );
const jetpackPlansPath = getRedirectUrl( 'jetpack-my-jetpack-site-only-plans', {
site: siteSuffix,
query,
} );

const activationButtonLabel = __( 'Activate Jetpack in one click', 'jetpack-my-jetpack' );
const { refetch: refetchOwnershipData } = useProductsByOwnership();
Expand Down

0 comments on commit 9406561

Please sign in to comment.