How to Add a PayPal is Optional Message to Registration Checkout

In this tutorial we will explain how to add a message to registration checkout to let your registrants know that a PayPal account is optional. This will only work for PayPal premier and business account holders. Additionally, PayPal disables guest checkout for buyers in certain countries. If you are not sure if you have the correct account, then please get in touch with PayPal support.

Enable Guest Checkout through your PayPal Account

Login to your PayPal.com account. Then click on Profile. On the next page, locate the Selling online section and then Website preferences. Click on the Update link for Website preferences. Scroll down the page until you see the setting for PayPal Account Optional. Set it to On and then click on the Save button which appears at the end of the page.

Change the Current PayPal Messaging

The existing PayPal messaging can be changed using a gettext filter for WordPress. Below we have some sample code that will do that for you:

function ee_payment_options_paypal_optional( $translated, $original, $domain ) {
$strings = array(
 'After finalizing your registration, you will be transferred to the PayPal.com website where your payment will be securely processed.' => 'Upon clicking on the Finalize Registration 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 );

The filter above works by looking for a match for the existing messaging for PayPal and then replacing it with something else. The sample code can be copied and pasted into a site specific plugin. Be sure to save your edits and then you can go to an event and begin a registration to see how it appears.

Here is what our sample code looks like on the registration checkout page:

registration-checkout-paypal-optional-message

You can take this tutorial a step further by changing the default PayPal logo to one that shows the PayPal logo and major credit cards. See this additional resource for more information:

https://gist.github.com/lorenzocaum/831c531ca80906af2353


Need more help?

  • Browse or search for more information on this topic in our support forums. Customers with an active support license can open a support topic and get help from Event Espresso staff.
  • Have an emergency? Purchase a support token and get expedited one-on-one help!
  • Go back to documentation for Event Espresso
Event Espresso