Pay Per View register not redirecting to Paypal after sign up

Hi,

When a user wants to choose subscription it prompts the user with two choices. Login or register. If the user does not have an account they must register. However register takes the user away from the flow and then the user needs to go all the way back to the page and click the link again. How do we redirect the user to paypal once they register?

- Marc

http://staging.francolangues.com/oral-government-french-training/

  • Rupok

    Hi Marc

    Hope you had a wonderful day.

    How do we redirect the user to paypal once they register?

    You can add the following code in your functions.php file or MU Plugin to redirect your users after a successful registration:

    add_filter( 'registration_redirect', 'my_redirect_home' );
    function my_redirect_home( $registration_redirect ) {
    	return home_url('/about');
    }

    When you send your user to PayPal, it needs lots of other header information to be sent along with the request. So it will be wise to redirect the user to checkout page first after registration, and then he can make the payment.
    So replace "/about" with your checkout page slug in the code above. It will work.

    For creating a mu plugin, create a folder named "mu-plugins" inside your "wp-content" folder. Then inside that "mu-plugins" folder, create a file with any name and with a .php extension. Now paste the code inside that file and save.

    For getting more idea on mu plugins, you can go through this article: https://premium.wpmudev.org/manuals/wpmu-manual-2/using-mu-plugins/

    Please let us know if you have any confusion. We will be glad to help.

    Have a nice day. Cheers!
    Rupok

  • Rupok

    Hi Marc

    Hope you had a wonderful day.

    I see. This is a complicated scenario and I'm flagging our developer here for his valuable opinion. I believe, he can give us best idea on this.

    Please note, our developers work round the clock and they have to deal with lots of critical issues and other things. So it may take a little while for them to check this and provide feedback.

    Have a nice day. Cheers!
    Rupok