Public Ticket #3176049

Registration Link

Closed
Comments
2 Tickets 3
wiredphteam started the conversation 4 years ago on November 27, 2022 at 10:48am

Hi, 
Just wanted to ask on how can i change the Registration link, Instead of routing it to My Account(default), i wanted to route it somewhere else(like a registration page), Please see attached image as reference. 

Thanks and more power..

2,762
KingsPlugins replied 4 years ago on November 28, 2022 at 9:39am

Hi there,

You can do that with the following PHP code snippet:

add_filter('salesking_registration_page_link', function($link){
    $agent_id = get_user_meta(get_current_user_id(), 'salesking_agentid', true);
    $link = get_permalink( 12345 );
    
    $link.= '?regid='.$agent_id;
    return $link;
    
}, 10, 1);

In the above snippet, you can replace 12345 with the ID of your custom registration page (to get a page ID see https://webstick.blog/get-page-id-wordpress )

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