Add other "membership variable" in automated email response.

I wish to add other variable in message. This variable can be:
1. buddypress xprofile field
2. strings insert in add member section when you choose the membership. For example payment method (I have external payment method POS o Bank transfer)

I don't want to modify plugin code. So if there is a hook, that will be better.

  • Paul Kevin

    Hello Claudio ,

    Hope you are well today. There is a filter ms_model_communication_comm_vars that allows for this at around line 1382 of the file membership\app\model\class-ms-model-communication.php . You can use it as :

    add_filter( 'ms_model_communication_comm_vars', function( $default_vars, $type, $member, $subscription ) {
    	$default_vars['%my-var%'] = __( 'My Custom Var' );
    	return $default_vars;
    });

    To set your own custom variables. The parameter $type is the supported communication message types which are defined between line 52 and 67 of membership\app\model\class-ms-model-communication.php

    Warm Regards
    Paul Kevin

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.