Public Ticket #3055368

B2B King redirect after login

Closed
Comments
1 Ticket
Benjamin started the conversation 4 years ago on May 31, 2022 at 11:23pm

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,762
KingsPlugins replied 4 years ago on June 1, 2022 at 4:21pm

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://b2bkingplugin.com/docs/how-to-add-a-snippet-php-or-js/

Kind regards,

Stefan

Sign In