Skip to content

Instantly share code, notes, and snippets.

@andrewlimaza
Created December 18, 2017 14:37
Show Gist options
  • Save andrewlimaza/8c003f4b875d11e2322e99885ef347df to your computer and use it in GitHub Desktop.
Save andrewlimaza/8c003f4b875d11e2322e99885ef347df to your computer and use it in GitHub Desktop.
Change Invoice to Tax Invoice Paid Memberships Pro
<?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 '&larr; View All Invoices' :
$translated_text = __( '&larr; 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