• Resolved windslegend

    (@windslegend)


    Hello

    I need that after registering in woocommerce, users are redirected to a landing page.

    For this I have used several plugins and code snippets that I have found but none of them are effective since I think that your plugin may be influencing this action.

    Do you know how I could carry out the redirection?

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support Mirza Hamza

    (@hamza1010)

    Hi @windslegend,

    Thanks for your email,

    I hope you are doing well, You add this code snippet in the theme’s function.php.

    add_action( 'user_register', 'myplugin_registration_save', 10, 1 );
     
    function myplugin_registration_save( $user_id ) {
        wp_redirect( home_url('/profesional/'));
        exit;
     
    }

    Please check it and let me know.

    Thanks & Regards

    WP Experts Support Team

    Thread Starter windslegend

    (@windslegend)

    Hi

    Works perfect! A lot of thanks ??

    Regards

    Plugin Support Mirza Hamza

    (@hamza1010)

    Hi @windslegend,

    We would appreciate a kind and honest review.

    Thanks

    Thread Starter windslegend

    (@windslegend)

    Hello again

    We have a problem with your code snippet, in the woocommerce registry we have added that users must fill the billing phone and the province but since your snippet was added, this data is not being registered in the database (user info).

    Do you know what happens?

    Regards

    • This reply was modified 2 years, 8 months ago by windslegend.
    Plugin Support Mirza Hamza

    (@hamza1010)

    Hi @windslegend,

    We have forwarded this to our technical team we will get back to you.

    Thanks

    Plugin Support Mirza Hamza

    (@hamza1010)

    Hi @windslegend,

    You can add this code snippet in the theme’s function.php

    add_action('woocommerce_created_customer', 'redirect',11);        
    function redirect() {
    
        myplugin_registration_save();
    
    }
     
    function myplugin_registration_save(  ) {
        wp_redirect( home_url('/profesional/'));
        exit;
     
    }

    Please check it and let me know how it is working for you.

    Thanks

    Thread Starter windslegend

    (@windslegend)

    Hello

    A lot of thanks, looks than now it is working fine.

    Regards

    Plugin Support Mirza Hamza

    (@hamza1010)

    Hi @windslegend,

    Thanks for the feedback.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Redirect after register’ is closed to new replies.