Forked from ipokkel/change-add-paypal-express.php
Last active
September 26, 2023 17:23
-
-
Save michaelbeil/8e34ef00844c5690287140a32cdd452b to your computer and use it in GitHub Desktop.
Change text for add paypal express to checkout translation strings
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 | |
| // Add this code below to your PMPro Customizations plugin - http://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
| add_filter( 'gettext', 'change_text_for_add_paypal_express', 20, 3 ); | |
| /** | |
| * @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext | |
| */ | |
| function change_text_for_add_paypal_express( $translated_text, $text, $domain ) { | |
| switch ( $translated_text ) { | |
| case 'Choose Your Payment Method': | |
| $translated_text = __( 'Choose Your Payment Method', 'pmpro-add-paypal-express' ); | |
| break; | |
| case 'Check Out with a Credit Card Here': | |
| $translated_text = __( 'Check Out with a Credit Card Here', 'pmpro-add-paypal-express' ); | |
| break; | |
| case 'Check Out with PayPal': | |
| $translated_text = __( 'Check Out with PayPal', 'pmpro-add-paypal-express' ); | |
| break; | |
| case 'Pay by Check': | |
| $translated_text = __( 'Pay by Check', 'pmpro-add-paypal-express' ); | |
| break; | |
| } | |
| return $translated_text; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment