Forked from JarrydLong/mypmpro-adjust-shipping-text.php
Last active
February 26, 2021 10:02
-
-
Save femiyb/837c636111ea1ce753a9f791fe36295b to your computer and use it in GitHub Desktop.
This file contains 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 recipe will adjust shipping related text to something of your preference. | |
* | |
* You can add this recipe to your site by creating a custom plugin | |
* or using the Code Snippets plugin available for free in the WordPress repository. | |
* Read this companion article for step-by-step directions on either method. | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function changet_text_shipping_information( $translated_text, $text, $domain ) { | |
switch ( $translated_text ) { | |
case 'Shipping Address' : | |
$translated_text = __( 'Postal Address', 'paid-memberships-pro' ); | |
break; | |
case 'Ship to the billing address used above.' : | |
$translated_text = __( 'Ship to the billing address.', 'pmpro-shipping' ); | |
break; | |
} | |
return $translated_text; | |
} | |
add_filter( 'gettext', 'changet_text_shipping_information', 20, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment