Skip to content

Instantly share code, notes, and snippets.

@lorenzocaum
Last active August 29, 2015 14:01
Show Gist options
  • Save lorenzocaum/7b6b170ceccb275b5c3f to your computer and use it in GitHub Desktop.
Save lorenzocaum/7b6b170ceccb275b5c3f to your computer and use it in GitHub Desktop.
Setup PayPal is optional messaging for Event Espresso 3
/* Style PayPal optional messaging */
#external-link-msg-pg {
padding: 1em;
margin:0 0 2em;
background-color: #FFFFE0;
border:1px solid #E6DB55;
border-radius: 2px; }
<?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 );
@lorenzocaum
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment