Last active
April 3, 2023 14:08
-
-
Save ipokkel/e9b6c323470717ded0f57578cb5bd4a2 to your computer and use it in GitHub Desktop.
Change the "Change" link to "Upgrade" on the Membership Account page under My Memberships.
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 | |
/** | |
* Change the "Change" link under My Memberships to "Upgrade" | |
* | |
* You can add this recipe to your site by creating a custom plugin | |
* or using the Code Snippets plugin available for free in the WordPress repository. | |
* Read this companion article for step-by-step directions on either method. | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function customize_change_link_for_pmpro_member_action_links( $pmpro_member_action_links ) { | |
$pmpro_member_action_links['change'] = sprintf( | |
/* translators: 1: Membership Levels URL. 2: Link text. */ | |
'<a id="pmpro_actionlink-change" href="%1$s">%2$s</a>', | |
pmpro_url( 'levels' ), | |
esc_html__( 'Upgrade', 'paid-memberships-pro' ) | |
); | |
return $pmpro_member_action_links; | |
} | |
add_filter( 'pmpro_member_action_links', 'customize_change_link_for_pmpro_member_action_links' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment