Membership plugin skip Subscription page

Hello, the plugin is very convoluted in terms of programming. How would I skip the "choose" a subscription page, if we only have one subscription to choose from. I did a Redirect to next page, onsubmit, but it causes the page to show for 1/2 sec. Any shortcut or direction you can give me.

1. Register name/pass
2. Choose package (Best way on HOW Skip?)
3. Make payment

Thanks!

  • Ash
    • WordPress Hacker

    Hello @sean

    I hope you are well today.

    Please try to use the following code:

    function custom_register_url($link){
        return 'http://honestornot.com/sign-up/?action=registeruser&subscription=1';
    }
    add_filter('register','custom_register_url');
    
    function custom_fix_register_urls($url, $path, $orig_scheme){
        if ($orig_scheme !== 'login')
            return $url;
    
        if ($path == 'wp-login.php?action=register')
            return 'http://honestornot.com/sign-up/?action=registeruser&subscription=1';
    
        return $url;
    }
    add_filter('site_url', 'custom_fix_register_urls', 10, 3);

    You can add those codes in your functions.php in the theme, if you think your theme won’t be changed. Otherwise mu-plugins is the best solution. To use mu-plugins, go to /wp-content/ and find the folder with name 'mu-plugins'. If there is no folder in that name, then create a folder, name it 'mu-plugins', create a file inside that, give any name you like and paste the code in there. You don't need to activate that plugin. Mu-plugins means must use plugins, so it will be activated automatically always. If you use mu-plugins then add a php start tag at the beginning of the code.

    Hope it helps :slight_smile: Please feel free to ask more question if you have any.

    Cheers
    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.