Okay
  Public Ticket #2848256
PUBLIC TICKET #2725592
Closed

Comments

  •  2
    Nigel started the conversation

    I have tried using the snippetĀ 

    add_action('woocommerce_login_redirect', function($url){    $url = get_home_url();    // for shop url use $url = get_permalink( wc_get_page_id( 'shop' ) )    return $url;
    }
    

    But I get an error message:

    The code snippet you are trying to save produced a fatal error on line 6:

    syntax error, unexpected end of file, expecting ')'

    Can you assist?


  •  2,217
    WebWizards replied

    Hi Nigel,

    Thank you for purchasing the plugin!


    That snippet does have an error in it. The correct snippet would be:

    add_action('woocommerce_login_redirect', function($url){
        $url = get_home_url(); 
        return $url;
    });
    

    The above will redirect users to the HOMEPAGE after they login. Is that what you are trying to achieve?


    Kind regards,

    Stefan

  •  2
    Nigel replied

    Thank you so much, Stefan

    Works perfectly now.
    Great support. And I am really happy with the Plugin. Far superior to the previous one I was using.

    Nigel