• Resolved jkthompson83

    (@jkthompson83)


    I have a webinar listings page and I need to be able to redirect users back to the specific webinar they have registered for. I can’t get the code below to work, but feels like this action after registration would work? i’ve stuck this in function.php, but not able to get it working.

    add_action( ‘um_registration_complete’, ‘my_registration_complete’, 10, 2 );
    function my_registration_complete( $user_id, $args ) {
    wp_redirect(“/redirecturl”);
    }

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @jkthompson83

    Try changing the priority from 10 to 1.

    e.g. add_action( ‘um_registration_complete’, ‘my_registration_complete’, 1, 2 );

    Regards,

    Thread Starter jkthompson83

    (@jkthompson83)

    Thanks @champsupertramp but that just redirects me to /register. Tried echoing the function, but that didnt return anything, so not sure this function is working?

    add_action( ‘um_registration_complete’, ‘my_registration_complete’, 1, 2 );
    function my_registration_complete( ) {
    // echo “REDIRECT”;
    wp_redirect(“/newredirect”);
    }

    Thread Starter jkthompson83

    (@jkthompson83)

    Hi @champsupertramp, my apologies, your code did work (potentially the original did). in my user roles, registration options, under ‘Set Custom Redirect URL’, I had ‘/register’. Removing this and the code above seems to work fine. Thanks – this can be closed.

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @jkthompson83

    Thanks for letting us know. I am closing this thread now.

    Regards,

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Redirect to url after registration on webinar listings page’ is closed to new replies.