Skip to content

Commit 26726dd

Browse files
authored
Launch Site Flow: Add more permissive WP Admin redirects (#109874)
1 parent e9c9555 commit 26726dd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

client/signup/config/flows.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,13 @@ function getLaunchDestination( dependencies ) {
109109
return addQueryArgs( { celebrateLaunch: 'true' }, dependencies.back_to );
110110
}
111111

112-
if ( dependencies.refParameter === 'wp-admin' ) {
112+
const ref = dependencies.refParameter?.trim() ?? '';
113+
const isWpAdminPath = ref === 'wp-admin' || ref.startsWith( 'wp-admin/' );
114+
115+
if ( isWpAdminPath ) {
113116
return addQueryArgs(
114117
{ 'celebrate-launch': 'true' },
115-
`https://${ dependencies.siteSlug }/wp-admin`
118+
`https://${ dependencies.siteSlug }/${ ref }`
116119
);
117120
}
118121

0 commit comments

Comments
 (0)