Created
December 18, 2017 14:37
-
-
Save andrewlimaza/8c003f4b875d11e2322e99885ef347df to your computer and use it in GitHub Desktop.
Change Invoice to Tax Invoice Paid Memberships Pro
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 all 'invoice' to 'tax invoice' | |
| * Add this code to PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
| */ | |
| function theme_change_comment_field_names( $translated_text, $text, $domain ) { | |
| switch ( $translated_text ) { | |
| case 'Invoice #' : | |
| $translated_text = __( 'Tax Invoice #', 'paid-memberships-pro' ); | |
| break; | |
| case '← View All Invoices' : | |
| $translated_text = __( '← View All Tax Invoices', 'paid-memberships-pro' ); | |
| break; | |
| case 'No invoices found.' : | |
| $translated_text = __( 'No tax invoices found.', 'paid-memberships-pro' ); | |
| break; | |
| case 'Invoice #%s on %s' : | |
| $translated_text = __( 'Tax Invoice #%s on %s', 'paid-memberships-pro' ); | |
| break; | |
| } | |
| return $translated_text; | |
| } | |
| add_filter( 'gettext', 'theme_change_comment_field_names', 20, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment