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.

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

Using the Membership Card Block

The Membership Card Add On introduces a dedicated block that makes setting up your card easier than ever. Customizing Card Content via The “Elements” Field The Elements text area provides granular control over which text and data appear on the card. You can use it to structure the layout of your card’s information by entering (more…)

Continue Reading

Using the Membership Card Shortcode

If you are using the Classic Editor, want to place the card in a template file, or want to insert it into a page using a page builder, you can use the shortcode. Basic Usage [pmpro_membership_card] Advanced Customization If you are manually implementing the card using the [pmpro_membership_card] shortcode, then you can use the following (more…)

Continue Reading

How to Customize Your Membership Card Design

The Membership Card automatically inherits styling from your core Paid Memberships Pro settings. To adjust the colors and general appearance: If you need further styling, the plugin applies specific CSS classes that you can target with custom CSS. If you want to create advanced customizations, please refer to our guide on Creating Custom Membership Cards. (more…)

Continue Reading

Membership Card: Action and Filter Hooks

For developers requiring advanced customization beyond the template and block settings, the Membership Card Add On offers several action and filter hooks. Filters Hook Description Default Behavior apply_filters( ‘pmpro_membership_card_since_date’, string $since_date ) Filters the “Member Since” date displayed on the card. Shows the user_registered date (the date the user registered for the site). apply_filters( ‘pmpro_membership_card_qr_code_size’, (more…)

Continue Reading

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 February 5, 2026


Was this article helpful?
YesNo