Skip to content

Instantly share code, notes, and snippets.

@andrewlimaza
Last active December 23, 2020 07:27
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 andrewlimaza/bdc325dfa544fd8b4026fbd95ac817f4 to your computer and use it in GitHub Desktop.
Save andrewlimaza/bdc325dfa544fd8b4026fbd95ac817f4 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' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment