The Paid Memberships Pro Membership Card Add On allows you to add a QR code to each users’ membership card. By default, the card displays specific user and membership data as defined by shortcode attributes

This code recipe extends and allows customization of the user and membership data that is displayed when the QR code is scanned. 

Banner Image for Return Membership Information When Scanning QR Codes

To add a QR code to your Membership Card, the attribute qr_data must be included in your shortcode. See the Membership Card Add On page for shortcode attribute and examples.

Code Recipe: Active Membership Information on QR Code

This code recipe will return the following information: 

  • First Name
  • Last Name
  • Membership Level Name
  • Membership Expiration Date
  • Date and Time of QR Scan
  • “No Membership” Text for Non-Members
Sample QR Code Information

If you have User Fields you would like to display on the QR code, add your custom fields to the code after line 23. 

For example, the image below shows a return of the custom field favorite_food on line 9. 

Screenshot of custom field line in Code Snippet plugin

The Code Recipe (PHP)

Code Recipe: Member Profile URL on QR Code

This code recipe will open the URL of the member’s profile when the QR code is scanned on the membership card.

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.

Check out this resource for more ways to customize your membership card.

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