Created
May 29, 2026 08:07
-
-
Save andrewlimaza/5a2a11c99467a4093a8a50fc9ef9ca33 to your computer and use it in GitHub Desktop.
HIde "Change" option on the PMPro Membership Account Page
This file contains hidden or 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 | |
| /** | |
| * Hide the "Change" link on the Membership Account page for every active member. | |
| * Add this code to your site by following this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
| */ | |
| function my_pmpro_member_action_links( $pmpro_member_action_links, $level_id ) { | |
| // Unset the 'change' action link entirely | |
| if ( isset( $pmpro_member_action_links['change'] ) ) { | |
| unset( $pmpro_member_action_links['change'] ); | |
| } | |
| return $pmpro_member_action_links; | |
| } | |
| add_filter( 'pmpro_member_action_links', 'my_pmpro_member_action_links', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment