For developers requiring advanced customization beyond the template and block settings, the Membership Card Add On offers several action and filter hooks.
Filters
pmpro_membership_card_since_date
Filters the “Member Since” date displayed on the membership card. By default this shows the user_registered date (the date the user registered for the site).
apply_filters( 'pmpro_membership_card_since_date', string $since_date );
Parameters
$since_date: string; The “Member Since” date displayed on the card.
pmpro_membership_card_qr_code_size
Filters the dimensions of the generated QR code image. Defaults to 125×125.
apply_filters( 'pmpro_membership_card_qr_code_size', string $size );
Parameters
$size: string; The dimensions of the generated QR code image.
pmpro_membership_card_qr_data_other
Allows a developer to set a custom value to be encoded in the QR code when qr_data is set to ‘other’ in the Block settings or Shortcode. Returns no value unless a custom function is hooked in.
apply_filters( 'pmpro_membership_card_qr_data_other', object $pmpro_membership_card_user, string $option );
Parameters
$pmpro_membership_card_user: object; The membership card user object.$option: string; The QR data option set in the Block settings or Shortcode.
pmpro_membership_card_left
Allows customization of the HTML content for the left-hand section of the card. By default it displays content based on the elements’ settings.
apply_filters( 'pmpro_membership_card_left', string $left_html, array $args );
Parameters
$left_html: string; The HTML content for the left-hand section of the card.$args: array; The array of arguments used to build the card.
pmpro_membership_card_right
Allows customization of the HTML content for the right-hand section of the card. By default it displays the user avatar and QR code (if enabled).
apply_filters( 'pmpro_membership_card_right', string $right_html, array $args );
Parameters
$right_html: string; The HTML content for the right-hand section of the card.$args: array; The array of arguments used to build the card.
pmpro_membership_card_get_display_value
Filters the specific value returned for any display element (e.g., display_name, user_email). By default it returns the raw data pulled from the database or calculated by the plugin.
apply_filters( 'pmpro_membership_card_get_display_value', string $value, string $field_key, object $pmpro_membership_card_user, array $args );
Parameters
$value: string; The value returned for the display element.$field_key: string; The key of the display element being filtered.$pmpro_membership_card_user: object; The membership card user object.$args: array; The array of arguments used to build the card.
pmpro_membership_card_template_path
Filter the template path for the membership card.
apply_filters( 'pmpro_membership_card_template_path', string $template_path, array $atts, string|null $content, string $code );
Parameters
$template_path: string; The path to the template file.$atts: array; The shortcode attributes.$content: string|null; The shortcode content.$code: string; The shortcode name.
For code snippets and examples on how to use these new filters for advanced customizations, please refer to our customization documentation.
Get Support From Our Team of Experts
Have a question about how to use this feature? Our Support Page outlines three ways to get support.
Our Max plans include hands-on help customizing your membership site and implementing new features. Upgrade to PMPro Max now »
Last updated on June 24, 2026

