• Resolved midnitedev

    (@midnitedev)


    ’ve been using PMPro’s add-on Email Templates Add On to customize email templates sent to the subscriber. I’ve got 3 pmpro levels: paid, free trial, and gift. What I want to do is to send custom emails based on templates depending on these levels. I’ve been referring to the templates from the add-on to do this but the add-on doesn’t seem to be able to let me create my own custom email template that’s based on the pmpro level, only modify existing pmpro email templates. Is there any other add-on to let me do this or do I need to customize the plugin on my own to be able to do it.

    Plugin Information:
    Plugin info:
    PMPro Version 2.2.6
    Add-ons:
    Email Confirmation Add On
    Email Templates Add On
    Extra Expiration Warning Emails Add On
    Member Homepages Add On
    Register Helper Add On
    WooCommerce Add On

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Andrew Lima

    (@andrewza)

    Hi @midnitedev

    Thank you for using Paid Memberships Pro.

    This would require custom code to change the email template based on the user’s level. The Email Template Add On only allows you to edit the email contents in general and not per level.

    Here is a code snippet you may work from to adjust the email contents based on a user’s level – https://gist.github.com/andrewlimaza/86e38ab9d0368dda34ae1b62e8da9f21

    Thank you for your patience and understanding.

    Thread Starter midnitedev

    (@midnitedev)

    @andrewza Thank you very much, I’ll try it out. I do have a couple of questions though,

    a) does this overwrite the email template add-on custom changes? if not, then do I need to just remove the changes made there or do I need to deactivate/remove the add-on?

    b) when calling some variables, for example, validation link which in the add-on is referred to as !!validation_link!!, do we have an equivalent for calling it in that code? I’ve been looking for some thing similar such as $user -> validation_link or anything similar.

    c) this might not be particularly related considering its a customization issue, but I haven’t seen this custom code on the pmpro website so I assume the plugin or any add-ons doesn’t include this. Is this custom code going to be a part in future versions of plugin/add-on or is this solely for specific user requirements and at the moment just used for reference?

    Thanks.

    Thread Starter midnitedev

    (@midnitedev)

    @andrewza I tested it, so it has a weird behavior in that on $email -> subject, where I use !!sitename!! it fails on the email received. It shows !!sitename!! on the subject line (gmail)

    On $email -> body however, !!validation_link!! works. I get an actual link on the subject body of the email confirmation I receive.

    I guess I also have to disable the add-on to enable the changes on pmpro-customizations.php for the email confirmation template.

    Plugin Author Andrew Lima

    (@andrewza)

    @midnitedev I noticed you opened a ticket on our site. I’ll follow up with our support engineer to continue to assist you with this on there – and I’ll chime in too.

    I think it’s not rewriting in some cases and might need to add in the custom variables rewrite with this code recipe.

    Thank you for your patience and understanding.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Creating a custom email template depending on pmpro level’ is closed to new replies.