Skip to content

Instantly share code, notes, and snippets.

@andrewlimaza
Created March 10, 2021 11:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save andrewlimaza/aac5c0c93a4ed6c3224e3d9a67fbc303 to your computer and use it in GitHub Desktop.
Save andrewlimaza/aac5c0c93a4ed6c3224e3d9a67fbc303 to your computer and use it in GitHub Desktop.
Change the We Accept Checkout Text for Paid Memberships Pro.
<?php
/**
* Change the "We Accept..." text on the checkout page.
* Follow this guide to add custom code to your membership site - http://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function change_my_pmpro_account_text( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'We Accept %s' :
$translated_text = __( 'We accept all major credit cards', 'paid-memberships-pro' );
break;
}
return $translated_text;
}
add_filter( 'gettext', 'change_my_pmpro_account_text', 20, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment