I assume because the function is not called until someone logs in.
That is correct. wpmem_login_redirect
is a filter that happens when a user is actually logging in. If they are coming to the site and, due to having a valid cookie, are in a logged in state, they will not be redirected.
From a user experience standpoint, it’s not really good form to just redirect someone when they return, even if that person is in a logged in state. Likewise, you are going to have a very hard time finding a method that doesn’t just redirect them regardless of whether they are returning or browsing the site.
The function that you want to use for redirection is wp_redirect(). You could attach that to some action that occurs before any info is sent downstream to the browser (such as init) and test to see if they are logged in:
add_action( 'init', 'my_redirect' );
function my_redirect(){
if( is_user_logged_in() ) {
wp_redirect( 'http://somedomain.com/some-page' );
exit();
}
}
Like I said, this doesn’t differentiate whether the user has just shown up, or is coming from one page to another, so to make this actually useful and not annoying, you would need to add some kind of process of determining that and acting accordingly.