Created
June 29, 2017 12:06
-
-
Save andrewlimaza/607784cc0e128689c060b0f349a503fb to your computer and use it in GitHub Desktop.
Change postal code to zip code in PMPro
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 | |
/** | |
* 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