I have set up a custom registration plugin on my wordpress installation. The problem is that although it works perfectly when I do
/wp-admin.php?action=register
When I attempt /register I get redirected to the buddypress plugin registration page. I disabled this by adding
remove_action( 'bp_init', 'bp_core_wpsignup_redirect' );
remove_action( 'bp_screens', 'bp_core_screen_signup' );
in my functions.php but now when I try to visit /register I get to the default registration page of wordpress and my plugin is ignored.
This is what I use to redirect to my custom plugin:
add_action('login_form_register', array($this,'redirect_to_custom_register'));
public function redirect_to_custom_register()
{
if ('GET' == $_SERVER['REQUEST_METHOD']) {
if (is_user_logged_in()) {
$this->redirect_logged_in_user();
} else {
wp_redirect(home_url('member-register'));
}
exit;
}
}
Any ideas why?