Last active
April 24, 2024 17:46
-
-
Save kimwhite/5bdd89e42e15189999ed31f2325a86bd to your computer and use it in GitHub Desktop.
Group Add On Change seat or seats to something else
This file contains 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 // do not copy this line. | |
/** | |
* This recipe will change the working Seat to what ever you choose | |
* | |
* use with Group Account Add On. https://www.paidmembershipspro.com/add-ons/group-accounts/ | |
* | |
* 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 my_pmpro_change_sponsor_text($translated_text, $original_text, $domain) { | |
switch ( $translated_text ) { | |
case 'This purchase includes %s additional seat.' : | |
$translated_text = __( 'This purchase includes %s related members.', 'pmpro-group-accounts' ); | |
break; | |
case 'This purchase includes %s additional seats.' : | |
$translated_text = __( 'This purchase includes %s related members.', 'pmpro-group-accounts' ); | |
break; | |
case 'Number of Seats' : | |
$translated_text = __( 'related members', 'pmpro-group-accounts' ); | |
break; | |
case 'Choose the number of seats to purchase. You can purchase between %s and %s seats.' : | |
$translated_text = __( 'Choose the number of related members to purchase. You can purchase between %s and %s related members.', 'pmpro-group-accounts' ); | |
break; | |
} | |
return $translated_text; | |
} | |
add_filter( 'gettext', 'my_pmpro_change_sponsor_text', 20, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment