WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. mike1394
    Member
    Posted 1 year 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.

    http://wordpress.org/extend/plugins/peters-login-redirect/

  2. Peter
    Member
    Plugin Author

    Posted 1 year 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
    Member
    Posted 1 year 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; ?>" />

    with

    <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
    Member
    Posted 2 months 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

About this Topic