apply_filters( 'wpas__user_email_notifications_tags_values', $tags, $user_id );
Add values to user email template tags
Version 5.1.1
add_filter( 'wpas__user_email_notifications_tags_values', function( $tags, $user_id ) {
$data = [];
foreach( $tags as $i => $tag ) {
$name = trim( $tag['tag'], '{}' );
switch( $name ) {
case 'my_tag_1':
$tag[ 'value' ] = 'My Tag 1 Value';
break;
case 'my_tag_2':
$tag[ 'value' ] = 'My Tag 2 Value';
break;
}
array_push( $data, $tag );
}
return $data;
}, 20, 2 );