Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save travislima/3a534702aa87ff1f0d31249f18939c02 to your computer and use it in GitHub Desktop.
Save travislima/3a534702aa87ff1f0d31249f18939c02 to your computer and use it in GitHub Desktop.
Show 'Member ID' on the account page for Paid Memberships Pro
<?php
/**
* This shows the WordPress User ID as a Member ID on the Paid Memberships Pro Account Page.
* Add the code below to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
* www.paidmembershipspro.com
*/
function pmpro_add_user_id_account() {
global $current_user;
echo '<li><strong>Member ID: </strong>' . $current_user->ID . '</li>';
}
add_action( 'pmpro_account_bullets_top', 'pmpro_add_user_id_account' );
@laurenhagan0306
Copy link

This recipe is included in the blog post on "Show ‘Member ID’ on the Membership Account Page for Paid Memberships Pro." at Paid Memberships Pro here: https://www.paidmembershipspro.com/show-member-id-on-the-membership-account-page-for-paid-memberships-pro/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment