This topic has 6 replies, 4 voices, and was last updated 3 years, 1 month ago ago by Rose Tyler
1) When i login to my website, it goes to my account page, i know it is a default, but how can i redirect it to my homepage instead?
2) When logout, i find that i need to confirm logout again before i can logout, how can i make it just a simple step, once logout then it is done?
Hello,
1) Our theme does not have such options but you may try WooCommerce plugin to implement this redirect, read WooCommerce documentation https://docs.woocommerce.com/document/redirect-after-login-registration-logout/
2) Try this plugin https://wordpress.org/plugins/disable-woocom-logout-confirmation/
Regards
Hi, i managed to direct user who login via email to homepage. however, if the user login via facebook, it will still go to the my account page. Can you help me with it?
function ts_redirect_login( $redirect ) {
$redirect_page_id = url_to_postid( $redirect );
$checkout_page_id = wc_get_page_id( ‘checkout’ );
if( $redirect_page_id == $checkout_page_id ) {
return $redirect;
}
return wc_get_page_permalink( ‘/’ );
}
add_filter( ‘woocommerce_login_redirect’, ‘ts_redirect_login’ );
Hello,
Check now, please. I have added the custom code to child theme functions.php.
Regards
May I know what custom code you added to functions.php?
I’d like to redirect user to checkout page if they use facebook login
Hello,
Olga Barlow is on vacation right now. Check the functions.php file by yourself, or ask this question one more time on Monday.
I hope for your understanding.
Regards
You must be logged in to reply to this topic.Log in/Sign up