Paid Memberships Pro PDF Invoices allows you to customize PDF templates using a drag-and-drop editor and create dynamic PDF invoices by incorporating user-specific fields. Follow this guide to include user fields in your PDF templates effectively.

Using Custom Fields In PDF Templates

To add custom fields to your PDF templates, utilize placeholders in the format {{example_key}}, replacing example_key with the specific name or key of your desired User Field. When processed, the system automatically retrieves the corresponding user field or meta field value for the recipient member.

To edit the PDF template, you may navigate to your WordPress settings tab > PMPro PDF Invoices. From this screen you should be able to select a new pre-designed template or select “Edit Template” and add these placeholders where you need.

Example of the PDF invoices editor and how to add custom fields.

The Edit Template option is only available if you have a template selected for your PDF Invoices.

Automatic Detection Of Field Values

The plugin is designed to detect and replace placeholders enclosed in curly braces, for example {{dogs_name}} with the appropriate values relating to this field. If the specified key is incorrect or the data is unavailable, the placeholder will be replaced with a blank value.

Finding The User Field Name To Use

To ensure accurate results, locate the field name of your desired User Field by navigating to:

  1. Memberships > Settings > User Fields in your WordPress dashboard.
  2. Refer to the “Name” column for the exact key to use in your template.

In the below image, to show the members birthdate would use the variable {{birthday}} to dynamically show this value.

Example of how to find a User Field Name attribute for User Fields.

Similar principles may follow for any custom field that is stored against the WordPress’ user account and is not only limited to Paid Memberships Pro specific User Fields.

To add additional custom information to your PDF’s, that is outside user fields and meta, please follow this guide and code sample.

By following these steps, you can personalize your Paid Memberships Pro PDFs to include custom information specific to each user.