Skip Navigation

[Resolved] Redirect exist users to specific page if they have registered own product

This support ticket is created 3 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 1 reply, has 2 voices.

Last updated by Minesh 3 years, 2 months ago.

Assisted by: Minesh.

Author
Posts
#2371545

Tell us what you are trying to do?
I want to redirect existing users when login into the user form and going to a specific page.
My shortcode now look like: [wpv-login-form redirect_url="some link" allow_remember="true"] and this is totally fine to go if they don't have registered product.

But if they have registered their own products from before, on the login form I need them to go to another page. Is this possible with some conditional or?
Thank you.

Is there any documentation that you are following?
Not found.

Is there a similar example that we can see?
Not found.

What is the link to your site?
The website is under construction.

#2371631

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Toolset do not offer any login redirect hook. To redirect user after login to your desired link you can use the WordPress core hook: login_redirect
=> https://developer.wordpress.org/reference/hooks/login_redirect/

For example:

add_filter( 'login_redirect', 'my_login_redirect', 99, 3 );
function my_login_redirect( $redirect_to, $request, $user ) {
   
  // add your code to redirect user to your desired link
 
    return $redirect_to;
}