• Resolved g4macgregor

    (@g4macgregor)


    Does this paid extension use the WooCommerce login functions?

    I have been using the WordPress User Switching but need to have the ability to return to the page from which the $old_user clicked Switch to {$User}.

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    Do you have the right support forum? This isn’t a paid extension and I’m not sure what you’re asking.

    Thread Starter g4macgregor

    (@g4macgregor)

    Sorry, I didn’t look carefully enough at the extension I saw in WooCommerce.

    This is the right forum then, User Switching. I have been able to add the switch and switch back buttons where I needed them, and the switch it working great, but the switch back defaults back to the Users.php rather than the page from which the button was clicked.

    I’m using it to switch from an admin user/shop owner to user/customer page from the admin section of a WooCommerce order –?and this works. But when I switch back to the admin user, I would like it to return the order page I started on and I’m not seeing a way to get back there. Any suggestions?

    Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    You can add a redirect_to parameter to any of the switching URLs and it’ll override the default redirect location.

    Something like this should work:

    $url = add_query_arg( 'redirect_to', 'YOUR_URL', user_switching::switch_back_url( $old_user ) );
    
    Thread Starter g4macgregor

    (@g4macgregor)

    Perfect, thank you!

    John,
    do you plan to implement a frontend to set some settings like this ‘redirect_to’ feature?

    would be great in order to enable automatic update of your plugin

    thanks,
    Fabio

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘User Switching for WooCommerce’ is closed to new replies.