Show a Member’s Level Name in Post Comments

When a member posts a comment on your site, the recipe below will display their Membership Level name following the comment author’s name.

This can be useful for many membership sites, specifically sites that have multiple tiers of membership which equate to a member’s status, skill-level or denote a relationship to your company.

The author name is also updated in the Comments section of the admin dashboard so you can tell what membership levels users have when approving pending comments. This has been particularly useful for us on our own site to tell which of our blog post commenters are paying members.

Show member level name next to author name in comment

This page requires a PMPro Core Account or higher.

Already have an account? Login Now »

New to this site? Register Now »

Show a Member’s Expiration Date in a Page, Post, Widget, etc. via Shortcode

This simple code recipe creates a [pmpro_expiration_date] shortcode you can use in a page, post, widget, or pretty much anywhere on your site.

It shows the current logged in member’s expiration date or the expiration date for the user specified by the “user” attribute. The date is formatted per your site’s Settings > General > Date Format field. If there is no expiration or user, the shortcode displays “—“.


The Code Recipe

This code recipe requires a PMPro Plus Account or higher.

View Membership Options


How to Use

The shortcode [pmpro_expiration_date] can be used anywhere you would like to display the date. If you would like to add it to a widget area but it isn’t working, add this line of code to a helper PMPro Customizations plugin

// Enable the use of shortcodes in text widgets.
add_filter( 'widget_text', 'do_shortcode' );

I think a useful application of this shortcode would be to display a member’s expiration date on the bbPress Profile page. This recipe relies on our bbPress Add On setting to add the “Membership Level” section to the bbPress Profile, like this…

my_pmpro_bbpress_profile_expiration

This code recipe requires a PMPro Plus Account or higher.

View Membership Options

Methods to Totally Disable, Reroute, or Selectively Disable Paid Memberships Pro Emails to the Member/User or Admin

Paid Memberships Pro sends a variety of emails to the admin and member as related to their membership, subscription status, expiration, confirmation and more. If you’d like to alter the default distribution of these emails, below are a few methods to do just that. See a list of all PMPro-generated email here.


Use the Email Templates Admin Editor Add On

This add on (available through the WordPress.org Repository) allows you to selectively disable emails sent by Paid Memberships Pro. Just install and activate the add on, then navigate to the Memberships > Email Templates admin page, select an email to modify, and check the box for “Disable this email?”.

This is useful if other plugins on your site or third party services like Mailchimp or other email marketing programs are already sending emails to your customers for confirmations or cancellations. Just disable the corresponding PMPro email so your customers don’t receive multiple emails serving the same purpose.

View the Add On

Use the PMPro Toolkit Add On

Among other administrative features, the PMPro Toolkit add on allows you to automatically redirect all Paid Memberships Pro emails to a specific address. Just install and activate the add on, then navigate to Settings > PMPro Toolkit in your WordPress admin.

This is useful if you are testing emails on your site and want to see the emails that would be sent to your members.

View the Add On

Code Recipe to Automatically Disable All Email

The function below will disable all email sent by Paid Memberships Pro – both for the member and the administrator.

Copy and paste this code recipe into a helper PMPro Customizations plugin.

This code recipe requires a PMPro Plus Account or higher.


Code Recipe to Disable ONLY the Member/User Email

The function below will disable any email sent to the Member/User by Paid Memberships Pro. The admin emails will still be sent as intended.

Copy and paste this code recipe into a helper PMPro Customizations plugin.

This code recipe requires a PMPro Plus Account or higher.


Code Recipe to Disable Email for a Specific Membership Level

You could change the logic of these gists to selectively disable other kinds of emails. For example, here we look up information about the user to disable only emails for certain membership levels.

This code recipe requires a PMPro Plus Account or higher.