Redirect to custom page after registration

Hello Guys.

please is there a way to redirect users after registering to My Accounts page?

i tried this.

<?php add_action('ws_plugin__s2member_after_configure_user_registration', function($vars = array()) { if (!is_admin() && !empty($vars['processed']) && $vars['processed'] === 'yes') { $_POST['redirect_to'] = $_REQUEST['redirect_to'] = // Custom Thank-You Page URL. "http://mydomain.com/wp-login.php". // « change this value. // These will all be optional. Here as an example only. '?email='.urlencode($vars['email']). // Tack on the email address if you like. '&fname='.urlencode($vars['fname']). // Tack on the first name if you like. '&lname='.urlencode($vars['lname']). // Tack on the last name if you like. '&my_custom_field='.urlencode($vars['fields']['my_custom_field']). // A custom field maybe. '&username='.urlencode($vars['login']); // The user's login; i.e., their username. } }); But it redirects to the home page after registrattion.

I think you have a settings problem somewhere at your WP or s2M (or both). Please check all of them. If don’t helps, try to switch down plugins (except s2M) one by one, and test after each one. Also try same with your theme, but switch to “2016” theme. This way you will find is some external (to WP) code interacts with s2M.

I deactivated all my plugins except s2member.
And switched to 2016 theme.
Still the same…

OK, please check all settings of s2M, by documentation. Somewhere must be something wrong.

Also, what is your hosting company? Some hostings are not “s2M friendly”, please search about more info in the forum.

I am using host gator.