Support » Plugins and Hacks » [Resolved] Redirect after create an account

[Resolved] Redirect after create an account

  • Hello,

    I use woocommerce with plugin members only because I want that visitors must be logged before viewing my products.

    So, if a visitor visit site.com or site.com/shop, he is redirected to site.com/my-account page wich include short code [woocommerce_my_account]

    He can login if he has a account, or create an account and password if he is a new visitor.

    Then I use the following code :

    add_filter('woocommerce_login_redirect', 'ras_login_redirect');
    function ras_login_redirect( $redirect_to ) {
         $redirect_to = 'http:/site.com/shop';
         return $redirect_to;

    After login he is redirected to the products page.

    The problem is that if a new visitor create an account and password, he is redirected to my-account page.

    I would like that he is redirected to the products page also. http:/site.com/shop

    Does anybody have an idea ?

    Sorry for my english ..




Viewing 1 replies (of 1 total)
    add_filter ( ‘woocommerce_registration_redirect’, ‘my_registration_redirect’);
    function my_registration_redirect( $redirect ) {
    $redirect = ‘http://www.site.com/after’;
    return $redirect;

    /***** HOME AFTER LOGOUT *****/
    add_filter(‘logout_url’, ‘projectivemotion_logout_home’, 10, 2);
    function projectivemotion_logout_home($logouturl, $redir)
    $redir = get_option(‘siteurl’);
    return $logouturl . ‘&redirect_to=’ . urlencode($redir);

Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] Redirect after create an account’ is closed to new replies.