Register link in Protected Content page goes to default wordpress registration form

I have installed Membership Pro, but am struggling to remove some of the links to default WordPress pages.
For instance, the register link in protected content page takes users to WordPress user registration screen which we don't want.

  • Tho Bui
    • Staff

    Hi Marc,

    Regarding your issue, I checked and see in your theme or plugins added a snippet code like this:
    add_filter('ms_frontend_handle_registration', '__return_false');
    This will disable the redirect_url filter. I can't download your theme or all plugins to detect where was set it, and not sure why your dev added this code.
    So I added another snippet to your theme's functions.php (jupiterx/functions.php) file:

    add_filter( 'register_url', function($url){
        $url_custom = MS_Model_Pages::get_page_url( MS_Model_Pages::MS_PAGE_REGISTER );
        if( $url_custom ){
          $url = $url_custom;
        return $url;
    }, 999 );

    Kind Regards,
    Tho Bui

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.