Created
September 13, 2017 20:46
-
-
Save bappi-d-great/24196fcc7946d7919cc7b8e42cad8185 to your computer and use it in GitHub Desktop.
WPMU Membership 2: Add user email in the M2 communication email
This file contains 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_filter( 'ms_model_communication_comm_vars', function( $comm_vars, $type, $member, $subscription ) { | |
$comm_vars['%user-email%'] = 'User: User Email'; | |
return $comm_vars; | |
}, 99, 4 ); | |
add_filter( 'ms_model_communication_send_message_comm_var-%user-email%', function( $var_value, $type, $member, $subscription, $invoice ) { | |
return $member->email; | |
}, 99, 5 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment