Skip to content

Instantly share code, notes, and snippets.

@andrewlimaza
Last active July 9, 2021 16:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save andrewlimaza/b7eb7ba6bb4560e6d52cea2339ab4efb to your computer and use it in GitHub Desktop.
Save andrewlimaza/b7eb7ba6bb4560e6d52cea2339ab4efb to your computer and use it in GitHub Desktop.
Change the word "Seat(s)" to "Member(s)" for Paid Memberships Pro Sponsored Members Add On.
<?php
/**
* This will change all instances of seat(s) to member(s) for the Sponsored Members Add On - https://www.paidmembershipspro.com/add-ons/pmpro-sponsored-members/
* Add the code below to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_pmpro_change_seat_to_member( $output_text, $input_text, $domain ) {
if ( 'pmpro-sponsored-members' === $domain ) {
$output_text = str_replace( 'seats', 'members', $output_text );
$output_text = str_replace( 'Seats', 'Members', $output_text );
$output_text = str_replace( 'seat', 'member', $output_text );
}
return $output_text;
}
add_filter( 'gettext', 'my_pmpro_change_seat_to_member', 10, 3 );
@kimwhite
Copy link

need to change domain to pmpro-sponsored-members

@andrewlimaza
Copy link
Author

Thanks @kimwhite, this has been updated :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment