Redirect after login to My Account

function twstudio_customer_login_redirect( $redirect, $user ) {
    if ( wc_user_has_role( $user, 'customer' ) ) {
        $redirect = '/meine-seite/edit-account/'; 
    }
    return $redirect;
}
add_filter( 'woocommerce_login_redirect', 'twstudio_customer_login_redirect', 9999, 2 );

Leave a Reply

Your email address will not be published. Required fields are marked *