Skip to content

Instantly share code, notes, and snippets.

@bappi-d-great
Created September 13, 2017 20:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bappi-d-great/24196fcc7946d7919cc7b8e42cad8185 to your computer and use it in GitHub Desktop.
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
<?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