Created
December 17, 2025 12:38
-
-
Save andrewlimaza/4c32fe469faa5a58a2a8e664b7cee5c4 to your computer and use it in GitHub Desktop.
Replace !!pmprorate_downgrade_text!! wording using gettext
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 wording of the Prorations Downgrade Text. | |
| * Add this code to your site by following this guide - https://www.paidmembershipspro.com/documentation/templates/customizing-via-a-custom-plugin/ | |
| */ | |
| function my_pmpro_change_text( $translated_text, $text, $domain ) { | |
| if ( $domain == 'pmpro-proration' ) { | |
| if ( $text == 'Downgrading to %s on %s.' ) { | |
| $translated_text = 'Changing to %s on %s.'; // Adjust the wording here. | |
| } | |
| if ( $text == 'Downgrading to %s.' ) { | |
| $translated_text = 'Changing to %s.'; // Adjust the wording here. | |
| } | |
| } | |
| return $translated_text; | |
| } | |
| add_filter( 'gettext', 'my_pmpro_change_text', 20, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment