Skip to content

Instantly share code, notes, and snippets.

@lorenzocaum
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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

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.

@lorenzocaum
Copy link
Author

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