Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save femiyb/837c636111ea1ce753a9f791fe36295b to your computer and use it in GitHub Desktop.
Save femiyb/837c636111ea1ce753a9f791fe36295b to your computer and use it in GitHub Desktop.
<?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