Fixed the jetpack redirect url for sites in subdirectories (#17312)
* Fixed the jetpack redirect url for sites in subdirectories * Using admin_url instead of get_admin_url for consistency * Wrapped the generated url in esc_url_raw
This commit is contained in:
parent
9c2df6486c
commit
234d9e05a5
|
@ -1582,10 +1582,12 @@ class WC_Admin_Setup_Wizard {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$redirect_url = site_url( add_query_arg( array(
|
$redirect_url = esc_url_raw( add_query_arg( array(
|
||||||
|
'page' => 'wc-setup',
|
||||||
|
'step' => 'activate',
|
||||||
'from' => 'wpcom',
|
'from' => 'wpcom',
|
||||||
'activate_error' => false,
|
'activate_error' => false,
|
||||||
) ) );
|
), admin_url() ) );
|
||||||
$connection_url = Jetpack::init()->build_connect_url( true, $redirect_url, 'woocommerce-setup-wizard' );
|
$connection_url = Jetpack::init()->build_connect_url( true, $redirect_url, 'woocommerce-setup-wizard' );
|
||||||
|
|
||||||
wp_redirect( esc_url_raw( $connection_url ) );
|
wp_redirect( esc_url_raw( $connection_url ) );
|
||||||
|
|
Loading…
Reference in New Issue