Reply 248007 to: Login and Logout

Avatar: JS
JS
Participant
August 15, 2020 at 11:07

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’ );

Go To The Whole Conversation In Topic
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.