Remove login redirect

s2member is redirecting users to the home page upon login. I know this because if I disable s2members, users are not redirected to the home page upon login.

How do I remove this action? I do not want to set anything as a login welcome page, I don’t want to use a login widget, I just want s2member to stop interfering with Wordpress default behavior upon logging in.

I have tried the method on this page to add a filter to ws_plugin__s2member_login_redirect in s2-hacks.php:
https://www.s2member.com/forums/topic/how-to-remove-s2member-login-redirect-hook/
The filter is called, but no matter what it returns, it doesn’t change the behavior. Even If I use this filter to return a custom url, it ignores the custom url.

edit: I discovered that the problem can be solved with
remove_action(‘init’, ‘c_ws_plugin__s2member_login_redirects_r::remove_login_redirect_filters’, 11);
Is this going to interfere with other s2member functionality, or is there a better way to do this?

Did you set “Membership options” page?

Yes I did. I don’t see what that has to do with the login redirect.

Also “Login Welcome Page”?

I have not set anything as a login welcome page. As I said in my original post, I do not want to set a login welcome page in the s2member settings.

Sorry, forgot that you mentioned. So try the code you explain there too, should not touch other features of s2M.

Ok thanks. It does work and its good to know that it won’t interfere with any other features.