Created
June 16, 2025 09:21
-
-
Save dwanjuki/2377ab569ee5334e288ec731ff1810e7 to your computer and use it in GitHub Desktop.
Add the invited person's email address to the Group Account invite link.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Add the invited person's email address to the Group Account invite link. | |
* | |
* You can add this recipe to your site by creating a custom plugin | |
* or using the Code Snippets plugin available for free in the WordPress repository. | |
* Read this companion article for step-by-step directions on either method. | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function my_pmprogroupacct_invite_link_add_invited_email( $data, $email ) { | |
if ( 'pmprogroupacct_invite' === $email->template ) { | |
$data['pmprogroupacct_invite_link'] = esc_url( add_query_arg( 'invited-email', $email->email, $data['pmprogroupacct_invite_link'] ) ); | |
} | |
return $data; | |
} | |
add_filter( 'pmpro_email_data', 'my_pmprogroupacct_invite_link_add_invited_email', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment