If your site is using a trial period

WP Ultimo, by default, redirects the user to the admin panel of his or her newly created site. If you want to change this behavior, you’ll need to add the following filter to the functions.php file of your main site’s theme.

add_filter('wp_ultimo_redirect_url_after_signup', 'my_custom_url_redirect', 10, 4);

function my_custom_url_redirect($url, $site_id, $user_id, $transient) {
     return get_site_url($site_id);
}

The example above will redirect the user to his or her site front-end instead, but you can change the return value to any valid URL.

If your site is not using a trial period

If your site does not make use of the trial period feature, your clients will be prompted to pay right after they finish creating their account. This means that the above hook will not work as intended.

To redirect the user after he or she successfully integrates a payment form, use the snippet below:

add_filter('wu_gateway_get_url', 'my_custom_url_redirect_after_payment', 10, 2);
 
function my_custom_url_redirect_after_payment($url, $page_slug) {
      return $page_slug == 'success' ? home_url() : $url;
}

Like the example above, that code will redirect the user to the front-end of his or her site (home_url()), but can be replaced with any other URL.

Did this answer your question?