The Membership Card Add On allows you to display a customizable card on any page of your WordPress site using the Membership Card Block or shortcode.

This documentation provides step-by-step guidance for setting up and configuring the Add On, including instructions for styling the membership card. We’ve also included references to the available action and filter hooks so you can extend or customize functionality as needed.

This is a Standard Add On.

Standard membership includes all Standard Add Ons, unlimited premium support, automatic updates, and additional benefits.

Installation

You must have the Paid Memberships Pro plugin installed and activated with a valid license type to use this Add On.

  1. Navigate to Memberships > Add Ons in the WordPress admin.
  2. 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.
  3. Activate the plugin through the Plugins screen in the WordPress admin.

Video Demo: Membership Card Add On




Membership Card 2.0 Release: Developer Notes

The Membership Card Add On has undergone a major refactor to improve overall performance, reliability, and code structure. If you have previously customized this Add On using code snippets, please review the following changes to ensure your customizations continue to work as expected.

Important Changes and Deprecations

  • Hooks Removed: The pmpro_membership_card_after_card and pmpro_membership_card-extra_classes hooks are now deprecated. If you previously used these hooks, you must update your code. We recommend achieving the same result using the new elements attribute/block setting or the new filters listed below.
  • File Structure: To better organize the codebase, the template and admin helper functions have been moved to the /includes folder.

Using Custom QR Data

If you set the qr_data attribute to “other“, the plugin will look for a custom value. You must use the pmpro_membership_card_qr_data_other filter hook in your custom plugin or theme functions file to set this value.

To use the pmpro_membership_card_qr_data_other filter, you must set the qr_data attribute to “other“.

[pmpro_membership_card qr_code="true" qr_data="other"]

The corresponding custom PHP code in your theme’s functions.php or a custom plugin would look like this:

function my_custom_qr_data( $qr_data, $user, $option ) {
// Replace 'my_custom_field' with the name of the user meta key you want to encode.
$custom_data = get_user_meta( $user->ID, 'my_custom_field', true );
return $custom_data;
}
add_filter( 'pmpro_membership_card_qr_data_other', 'my_custom_qr_data', 10, 3 );

If your custom data includes special characters or you are returning complex data structures (such as a JSON object), you must properly filter the return value to ensure the QR code is generated correctly.

Example for JSON data:

// Ensure Unicode characters are not escaped when encoding JSON for the QR code

return json_encode( $return_value, JSON_UNESCAPED_UNICODE );

Last updated on March 6, 2026


Was this article helpful?
YesNo