Every email that could possibly be sent to your members or you as the site admin can be customized right in the admin of your WordPress site.
How to Edit Emails in Your WordPress Admin
Paid Memberships Pro includes native email template editing right in the admin of your WordPress site.
By default, all emails the core plugin sends are included in this editor. If you are using any Add Ons that have email templates, they will also be added here for customization.
- Navigate to Memberships > Settings > Email Templates in the WordPress admin.
- From this page, select a template to edit. The table includes any system email included in Paid Memberships Pro.
- Edit the template’s subject line and body text for your needs.
- You can add your own content or use the template variables (i.e. !!name!! or !!user_email!!) to pull in data about the membership, user, or order for the given email.
- When you’re finished editing, click “Save Template” before moving on to edit another template.
Add Custom Level Confirmation Message to Checkout E-mails
One popular checkout email customization is to include the confirmation message from the member’s chosen level. This is an easy way to personalize each email and include important details on how to access members-only content or other next steps like “complete your profile” or “access your downloads and courses”. Here’s how to add the level’s Confirmation message to the checkout emails.
- Navigate to Memberships > Settings > Levels in the WordPress admin.
- Select a level to edit.
- In the General Information section, locate the Confirmation Message field.
- Below the textarea field, tick to box labeled Check to include this message in the membership confirmation email.
- Now, navigate to Memberships > Settings > Email Templates.
- From this page, select a checkout template to edit.
- Add the variable
!!membership_level_confirmation_message!!
anywhere in the checkout email content. - When you’re finished editing, save settings for the template before moving on to edit another checkout template.
How to Disable PMPro Emails
Any PMPro email can be turned off through a simple settings screen. This is most often used when you have set up other welcome sequences through a WordPress-based or third-party email marketing platform. We do not recommend disabling the invoice or expiration emails.
- Navigate to Memberships > Settings > Email Templates in the WordPress admin.
- From this page, select the template you want to disable.
- Check the box to Disable this email?
- Click “Save Template“.
The selected email will no longer be sent through your site.
How to Test PMPro Emails
Admins can send a test version of any PMPro email from the Email Templates screen. Here’s how:
- Navigate to Memberships > Settings > Email Templates in the WordPress admin.
- From this page, select the template you want to test.
- In the Send a test email to: section, enter your email address and click the button to Save Template and Send Email.
Note that testing an email may or may not pull in the correct template variable data. This does not necessarily mean the template is broken. You can use a tool like Email Log by Sudar to view the live emails being sent through your membership site and confirm that everything is accurate.
Video Tutorial: How to Edit Emails
Email Template Variables Reference
Below is a list of variables that you can use to customize the emails. For your reference here is a list of email templates available in Paid Memberships Pro.
General Settings / Membership Info
Variable | Description |
---|---|
!!name!! | Display Name (Profile/Edit User > Display name publicly as) |
!!user_login!! | Username |
!!sitename!! | Site Title |
!!siteemail!! | Site Email Address (General Settings > Email OR Memberships > Email Settings) |
!!membership_id!! | Membership Level ID |
!!membership_level_name!! | Membership Level Name |
!!membership_change!! | Membership Level Change |
!!membership_expiration!! | Membership Level Expiration |
!!display_name!! | Display Name (Profile/Edit User > Display name publicly as) |
!!enddate!! | User Subscription End Date |
!!user_email!! | User Email |
!!login_link!! | Login URL |
!!levels_link!! | Membership Levels Page URL |
Billing Information
Variable | Description |
---|---|
!!billing_address!! | Billing Info Complete Address |
!!billing_name!! | Billing Info Name |
!!billing_street!! | Billing Info Street Address |
!!billing_city!! | Billing Info City |
!!billing_state!! | Billing Info State |
!!billing_zip!! | Billing Info ZIP Code |
!!billing_country!! | Billing Info Country |
!!billing_phone!! | Billing Info Phone Number |
!!cardtype!! | Credit Card Type |
!!accountnumber!! | Credit Card Number (last 4 digits) |
!!expirationmonth!! | Credit Card Expiration Month (mm format) |
!!expirationyear!! | Credit Card Expiration Year (yyyy format) |
!!membership_cost!! | Membership Level Cost Text |
!!instructions!! | Payment Instructions (used in Checkout – Email Template) |
!!invoice_id!! | The unique order code generated by PMPro for the order |
!!invoice_total!! | Invoice Total |
!!invoice_date!! | Invoice Date |
!!discount_code!! | Discount Code Applied |
!!invoice_link!! | Invoice Page URL |
Edit every email sent to your members, including the subject line and body text.
Available replacement variables for the emails you can edit in the admin
Add User Meta Fields
Personalize your email content when customizing email templates by including values from any user meta field using the format !!meta_key!!
. The meta_key
here corresponds to the exact field “name” value of the custom fields in your site.
You can include any custom fields created from the User Fields screen or in your custom code.
For example, if you’ve added a field named dog_name
in the user fields settings, you can display it in your email using the template variable !!dog_name!!
.
Overriding Templates via Custom Code
The best way to edit emails is through the settings in the admin of your WordPress site.
If you must use another method, we strongly advise you to use the hooks listed below to filter email details and the email contents:
Overriding Emails via Hooks and Filters
If you are a developer and want to edit the subject line or other properties of these emails, you can do so via hooks and filters. Here are the hooks available for extending or modifying emails in PMPro.
- pmpro_email_filter
- pmpro_email_recipient
- pmpro_email_sender
- pmpro_email_sender_name
- pmpro_email_subject
- pmpro_email_template
- pmpro_email_body
- pmpro_email_headers
Overriding Emails Via Theme Files
Before the admin-based email editor was added to Paid Memberships Pro, we supported custom email template files in your site’s active theme. This is no longer a recommended way to modify email templates and will have inconsistent performance moving forward.
Note for sites using the legacy theme file method: If you have edited the default template on the Memberships > Settings > Email Templates page, these changes will always override a custom template in your theme. If you add a custom email file to your theme and find that it is not sending your theme’s version, follow these steps:
- Navigate to Memberships > Settings > Email Templates.
- Select the template you are trying to update via your theme.
- Below the editor, click the “Reset Template” button.
After this update, test sending your email again and it should now send from the custom template in your theme.
Examples of Code-Based Email Modifications
Here is an example of how to change the subject line on an email.
You can also edit all of the email properties at once using the pmpro_email_filter hook, which passes just the $email
object.
It should be noted that the individual property filters run AFTER the general pmpro_email_filter
hook. If you use both techniques, make sure you don’t undo your customizations.
For a better understanding of how these hooks are applied view the source code in classes/class.pmproemail.php.