Okay
  Public Ticket #3055368
B2B King redirect after login
Closed

Comments

  • Benjamin started the conversation

    Hi.
    Is it possible to configure the B2B King plugin in such a way that customers are redirected to a specific page after registration? Any ways or tips on how to do this?


    Best regards
    Benjamin Bode

  •  2,503
    WebWizards replied

    Hi Benjamin,

    Thank you for getting in touch,


    Yes, you can do this by adding a code snippet to your site.

    For example, the following snippet will redirect users to the Shop page after registration:

    function filter_woocommerce_registration_redirect( $redirect ) {
        return get_permalink( wc_get_page_id( 'shop' ) );
    }
    add_filter( 'woocommerce_registration_redirect', 'filter_woocommerce_registration_redirect', 10, 1 );
    

    A PHP snippet can be added to functions.php, or by following our guide here: https://woocommerce-b2b-plugin.com/docs/how-to-add-a-snippet-php-or-js/


    Kind regards,

    Stefan