Hello,
I need to pass few extra parameters to the member activation link sent via email in buddypress; how can do that?
Spent a lot of time with no results yet. Any sort of help would be highly appreciated. Thanks.Default link is https://mydomain.com/activate/$activation_key/
I need it to be https://mydomain.com/activate/$activation_key/?key1=$my_key1&key2=$my_key2…
Hello Sarwar,
Welcome to the BuddyDev Forums. You can try the following code:
add_filter( 'bp_after_send_email_parse_args', function ( $args ) { if ( isset( $args['tokens'] ) && isset( $args['tokens']['activate.url'] ) ) { $args['tokens']['activate.url'] = add_query_arg( array( 'key1' => 'key1', 'key2' => 'key1213', ), $args['tokens']['activate.url'] ); } return $args; } );
Regards
RaviAh! Thank you so much Ravi. You saved me! This is exactly what I was looking for.
Viewing 5 posts - 1 through 5 (of 5 total)
The topic ‘ [Resolved] Append extra params to member activation link send via email’ is closed to new replies.
This topic is: resolved