Custom constants for Communications Messages

Hey Guys,

I have a generated key that I’m using to authenticate users (a hash link described here: https://premium.wpmudev.org/forums/topic/membership-how-can-i-offer-a-direct-link-url-so-no-login-is-required ).

I’d like to include this in an email to new users through the Communications tool in Membership. Is there a filter to add custom constants like %username% or %levelname%? I’d like to do something like:

Hi %firstname%,

Your URL is: %generatedlink%

Thanks guys!

Joe

  • aristath
    • Recruit

    Hello agaion @joe, I hope you’re well topday!

    I’m not aware of any way this can be done without hacking the plugin…

    You should be able to do it quick and dirty by modifying lines 17-30 and 366-442 of the membershipincludes/classes/class.communication.php file.

    I think you should be able to accomplish it without modifying the plugin core files by using the ‘membership_comm_constants_list‘ filter (see line 363 of that file) and then the ‘wpbe_plaintext_body‘ filter (line 457) to accomplish it but I simply haven’t tried it myself so I can’t verify it.

    I hope that helps!

    Cheers,

    Ari.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.