Last active
April 8, 2021 15:40
-
-
Save matheuswd/3f94cef8c616f2b7c0a9c86fea4557d8 to your computer and use it in GitHub Desktop.
A local translation snippet specifically for the Donor's choice checkbox. Change 'YOUR TEXT HERE' to your desired text.
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 | |
/** | |
* A local translation snippet specifically for the Donor's choice checkbox. Change 'YOUR TEXT HERE' to your desired text. | |
* | |
* @param $translations | |
* @param $text | |
* @param $domain | |
* | |
* @return string | |
*/ | |
function my_give_recurring_donor_choice_text_switcher( $translations, $text, $domain ) { | |
// changes the "every" text in the "Make this donation every [month/week/day] | |
// This section must be translated BEFORE the next one, so that the translated string is passed into the next string. | |
if ( $domain == 'give-recurring' && $text == 'Monthly' ) { | |
$translations = __( 'YOUR TEXT HERE', 'give' ); | |
} | |
return $translations; | |
} | |
add_filter( 'gettext', 'my_give_recurring_donor_choice_text_switcher', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment