Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

woo commerce login

Home / Forums / Virtue Theme / woo commerce login

This topic is: Not Resolved
[Not Resolved]
Posted in: Virtue Theme
April 27, 2015 at 4:34 am

Hi guys.
I would like to redirect my customers to the page they were viewing after they login instead of my account. I have managed to redirect them to go to a certain page after they login using a snippet of code and putting it in functions php, but I really need them to be returned to the page they were viewing. This is the code I have inserted to return them to a certain page. How can I modify this so they will be redirected to the the page they were viewing.
<?php

// Custom redirect for users after logging in
add_filter(‘woocommerce_login_redirect’, ‘bryce_wc_login_redirect’);
function bryce_wc_login_redirect( $redirect ) {
$redirect = ‘
return $redirect;
}
// Custom redirect for users after logging in
add_filter(‘woocommerce_registration_redirect’, ‘bryce_wc_register_redirect’);
function bryce_wc_register_redirect( $redirect ) {
$redirect = ‘
return $redirect;
}

Any thoughts would be greatly appreciated.
Kind regards, Paul

  • The forum ‘Virtue Theme’ is closed to new topics and replies.