Members and users can view their Membership in a card-like format via the website or print.
- Customization: Use shortcode attributes to customize user and membership details and extend customization through custom code.
- Highlight the Membership Level(s): Feature one or more membership levels on the card. v1.0+ is compatible with the Multiple Memberships Per User Add On.
- Branding: Add a personalized touch with icons or logos to reinforce your brand identity.
- Scan-and-Go Convenience: Enhance user interaction with a custom, scannable QR code on the Membership Card.
- Seamless Access: Members can easily view their Membership Card from the “Member Links” section of the Membership Account page.
- Edit Profile Accessibility: Find a direct link to the Membership Card on the “Edit Profile” page for quick and convenient management.
Installation
You must have the Paid Memberships Pro plugin installed and activated with a valid license type to use this Add On.
- Navigate to Memberships > Add Ons in the WordPress admin.
- Locate the Add On and click Install Now.
- To install this plugin manually, download the .zip file above, then upload the compressed directory via the Plugins > Add New > Upload Plugin screen in the WordPress admin.
- Activate the plugin through the Plugins screen in the WordPress admin.
Try a Demo: View the PMPro demo site or launch a free private demo now.
Video Demo: Membership Card Add On
Setting Up the Membership Card and Page
- In the WordPress admin, navigate to Pages > Add New.
- In the post editor, add the Membership Card shortcode:
[pmpro_membership_card]
- The page containing this shortcode will display the membership card and a link to the card’s print view.
- Customize your card by adjusting shortcode attributes.
- Add an image to your card by setting a featured image on the page.
- Publish the card or click Update to save your changes.
For deeper customizations, refer to our section on creating a custom membership card template.
Membership Card Shortcode Attributes
Shortcode attributes include:
- print_size: Specify what sizes to include in the “print” view; Default: all; Accepts: “small”, “medium”, “large” and/or “all”.
- qr_code: Optionally display a QR code on the card. Default: “false”; Accepts: “true” or “false”.
- qr_data: Specify what data the scanned QR code should return. Default: “ID”; Accepts: “email”, “ID”, “level” or “other”.
- If set to “other”, you must leverage the
pmpro_membership_card_qr_data_other
filter hook to set the value. - If you return values that could contain special characters, note that you must properly filter the return value. For example, if you are returning data in JSON format, consider returning the value using code like:
return json_encode( $return_value, JSON_UNESCAPED_UNICODE );
- If set to “other”, you must leverage the
If Paid Memberships Pro is activated, only members will be able to view the membership card. If not, the card will show for all WP users.
Adding an Image to the Card
You can add an icon or logo to the card by setting a “Featured Image” on the page that displays your membership card. Please follow this WordPress guide for adding a featured image to a page. You can also optionally show the user avatar on the card using the code recipe provided in this tutorial.
Create a Custom Template for the Membership Card
If you need to deeply customize the Membership Card in a way that shortcode attributes, custom CSS, or provided action and filter hooks allow, you will need to create a custom template for the card.
You can create your own custom Membership Card format and load it via a specific location in your theme. Copy the file located at: /pmpro-membership-card/templates/membership-card.php
to your active theme directory in this exact location: .../themes/my-theme/membership-card.php
.
This will load your custom template in place of the default template.
Action and Filter Hooks
apply_filters( 'pmpro_membership_card_since_date', string $since_date );
The default behavior will show the “user_registered” date (the date the user registered for the site).
do_action( 'pmpro_membership_card_after_card' );
Hook to show additional content via a custom function.
apply_filters( 'pmpro_membership_card_qr_code_size', string $size );
The default QR code value is set to “125×125”.
apply_filters( 'pmpro_membership_card_qr_data_other', object $pmpro_membership_card_user, string $option );
Allows you to show custom information when the shortcode’s qr_data
attribute is set to ‘other’.
e.g. [pmpro_membership_card qr_code=”true” qr_data=”other”]
Screenshots
This is a Standard Add On.
Standard Add Ons are included in all premium membership plans.