Peter's Login Redirect
[resolved] Sidebar login Widget woocommerce not redirecting (4 posts)

  1. mike1394
    Posted 3 years ago #

    I downloaded your plugin and it seemed like it was just what I needed. I got it to redirect upon logout where I wanted but logging in is a different story.

    I have two custom roles and I need each one to be redirected to a specific welcome page. E.g. dealers go to one url and distributors to another.

    Logging in from from the sidebar login widget it keeps redirecting to the "my account" page.

    Any ideas on this matter would be greatly appreciated.


  2. Peter
    Plugin Author

    Posted 3 years ago #

    If your login widget forces a specific redirect URL (and only one URL) you can try implementing this setting in my plugin:

    "Use external redirect file. Set this to "Yes" if you are using a plugin such as Gigya that bypasses the regular WordPress redirect process (and allows only one fixed redirect URL). Then, set the redirect URL to http://www.yoursite.com/wp-content/plugins/peters-login-redirect/wplogin_redirect_control.php".

    In other words, if you change that setting to "Yes" and hardcode the redirect URL in your login widget to that path, that might solve the issue.

  3. mike1394
    Posted 3 years ago #

    If you get asked this question in the future I finally found the answer. Using what you told me I figured out that if you replace this in the login-widget.php(create a woocommmerce folder in your theme so you don't lose it on update):

    <input type="hidden" name="redirect_to" class="redirect_to" value="<?php echo $redirect_to; ?>" />


    <input type="hidden" name="redirect_to" class="redirect_to" value="<?php echo site_url('/wp-content/plugins/peters-login-redirect/wplogin_redirect_control.php/'); ?>" />

  4. aartikhairnar
    Posted 2 years ago #

    not working for me...
    i want role based redirection using woocommerce log in menu.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Peter's Login Redirect
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic