diff --git a/includes/admin/class-wc-admin-setup-wizard.php b/includes/admin/class-wc-admin-setup-wizard.php index 10c49a1e597..e59daadd7ae 100644 --- a/includes/admin/class-wc-admin-setup-wizard.php +++ b/includes/admin/class-wc-admin-setup-wizard.php @@ -1582,10 +1582,12 @@ class WC_Admin_Setup_Wizard { 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', 'activate_error' => false, - ) ) ); + ), admin_url() ) ); $connection_url = Jetpack::init()->build_connect_url( true, $redirect_url, 'woocommerce-setup-wizard' ); wp_redirect( esc_url_raw( $connection_url ) );