Forked from andrewlimaza/show-member-id-to-account-page.php
Created
September 10, 2019 18:05
-
-
Save travislima/3a534702aa87ff1f0d31249f18939c02 to your computer and use it in GitHub Desktop.
Show 'Member ID' on the account page for Paid Memberships Pro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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
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/