Last active
August 29, 2015 14:01
-
-
Save lorenzocaum/7b6b170ceccb275b5c3f to your computer and use it in GitHub Desktop.
Setup PayPal is optional messaging for Event Espresso 3
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
/* Style PayPal optional messaging */ | |
#external-link-msg-pg { | |
padding: 1em; | |
margin:0 0 2em; | |
background-color: #FFFFE0; | |
border:1px solid #E6DB55; | |
border-radius: 2px; } |
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 | |
//* Do NOT include the opening php tag | |
//* Replace existing PayPal optional messaging with a new one | |
function ee_payment_options_paypal_optional( $translated, $original, $domain ) { | |
$strings = array( | |
'denotes an external link. clicking will take you to another website for payment processing.' => 'Upon clicking on the PayPal button, you will be transferred to PayPal.com where your payment will be securely processed. A <strong>PayPal account is not required</strong> and you can pay with a credit or debit card.' | |
); | |
if ( isset( $strings[$original] ) ) { | |
$translations = &get_translations_for_domain( $domain ); | |
$translated = $translations->translate( $strings[$original] ); | |
} | |
return $translated; | |
} | |
add_filter( 'gettext', 'ee_payment_options_paypal_optional', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example:
http://cl.ly/image/1e1z2h1Y0w40
Instructions:
CSS should be added to a child theme's stylesheet or through a plugin like My Custom CSS or Reaktiv CSS Builder.
PHP should be added to a site specific plugin or your child theme's functions.php.