-
-
Save kimwhite/7aee28432d3cde7916f6d6800d2ee3e4 to your computer and use it in GitHub Desktop.
Change the "Renew" link to text and link 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 "Renew" link under My Memberships | |
* Change link on line 15, text on line 16 | |
* 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['renew'] = sprintf( | |
/* translators: 1: Membership Levels URL. 2: Link text. */ | |
'<a id="pmpro_actionlink-renew" href="%1$s">%2$s</a>', | |
pmpro_url( 'levels' ), | |
esc_html__( 'RenewMe', '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