Skip to content

Instantly share code, notes, and snippets.

@andrewlimaza
Created June 29, 2017 12:06
Show Gist options
  • Save andrewlimaza/607784cc0e128689c060b0f349a503fb to your computer and use it in GitHub Desktop.
Save andrewlimaza/607784cc0e128689c060b0f349a503fb to your computer and use it in GitHub Desktop.
Change postal code to zip code in PMPro
<?php
/**
* This function changes all instances of 'Postal Code' to 'Zip Code' for Paid Memberships Pro.
* Add this code to your PMPro Customizations plugin - http://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
* Visit www.paidmembershipspro.com
*/
function pmpro_change_postal_code_text( $translated_text, $text, $domain ){
switch ( $translated_text ) {
case 'Postal Code' :
$translated_text = __( 'Zip Code', 'pmpro' );
break;
}
return $translated_text;
}
add_filter( 'gettext', 'pmpro_change_postal_code_text', 20, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment