Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save andrewlimaza/5a2a11c99467a4093a8a50fc9ef9ca33 to your computer and use it in GitHub Desktop.

Select an option

Save andrewlimaza/5a2a11c99467a4093a8a50fc9ef9ca33 to your computer and use it in GitHub Desktop.
HIde "Change" option on the PMPro Membership Account Page
<?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