The Approvals Process Add On adds a membership application process to your membership site. After a member signs up, site admins can approve or deny membership applications.

Once the decision is made, the applying member and the admin will receive email notifications with an update on the application status.

Some more exclusive membership sites need a way for admins to approve or deny members based on certain requirements—such as geographic location, age, experience, role, and more. 

To speed up the review process, this code recipe shows you how to add custom User Fields needed to the Approval Admin Email.

Banner Image for Add User Fields to Approval Admin Email

About the Code Recipe

In the code recipe example, we add the User Field “company” to the Approval Admin Email. 

There are a few steps to getting this customization in place.

  1. You first need to create the User Field in the “User Fields” settings of PMPro.
  2. Once the User Field is created, add this code snippet to your site.
  3. Customize the code snippet for your unique user field names. You can duplicate line 28 for each additional user field’s data you would like to be available in your email template.
  4. Finally, add the new placeholder variables to your approval emails.
    1. Navigate to Memberships > Settings > Email Templates.
    2. Locate the relevant approval email you want to edit. This code adds optional fields to the approved, pending, and denied emails sent to admins only.
    3. Add your custom placeholder variables to the email in the format `!!company!!` where the placeholder matches the $data key used in your snippet.
  5. Save the template.
Screenshot to edit email template for the Approvals admin email

The Code Recipe (PHP)

Adding the Recipe to Your Website

You can add this recipe to your site by creating a custom plugin or using the Code Snippets plugin available for free in the WordPress repository. Read this companion article for step-by-step directions on either method.

If you want to set up a unique approval or application process for your membership site, check out the documentation on our Approval Process Add On.

More Ways to Customize Emails

There are many ways to customize the emails that you send to both your admin and your members. The best place to start is reviewing our documentation on customizing email templates.

If you want to add more custom data to your emails, check out this tutorial on adding a new email template variable.

Free Course: Membership Site Development—The Basics

Develop a deeper understanding of membership site development in this beginner-level course. Learn how to make your site work better, save yourself time and money, and improve your site's performance.

Featured Image for Membership Site Development Course: The Basics
Was this article helpful?
YesNo