Title: Encode email address
Last modified: February 17, 2018

---

# Encode email address

 *  Resolved [George](https://wordpress.org/support/users/quantum_leap/)
 * (@quantum_leap)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/encode-email-address/)
 * I am using the [Email Address Encoder](https://en-gb.wordpress.org/plugins/email-address-encoder/)
   plugin to encode emails on the page from email harvesters. I noticed that your
   plugin exposes the email address in the source code. I managed to apply the function
   inside the views/paypal-button.php by replacing `$pd_options['paypal_account']`
   with `ae_encode_emails( $pd_options['paypal_account'] )`.
 * Is there a way to do that so it is update proof, maybe through a filter?

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Support [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/encode-email-address/#post-9984326)
 * Hi, thank you for suggestion and sharing your code. I have submitted a message
   to the developers to further investigate your request.
 * Kind regards
 *  Plugin Author [mra13 / Team Tips and Tricks HQ](https://wordpress.org/support/users/mra13/)
 * (@mra13)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/encode-email-address/#post-9986256)
 * I have added a new filter for this. Upgrade the plugin to the new version then
   you can use the following filter:
 * paypal_donations_merchant_email
 * If you need example code then check the following page:
    [https://www.tipsandtricks-hq.com/paypal-donations-widgets-plugin](https://www.tipsandtricks-hq.com/paypal-donations-widgets-plugin)
 *  Plugin Author [mra13 / Team Tips and Tricks HQ](https://wordpress.org/support/users/mra13/)
 * (@mra13)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/encode-email-address/#post-9986257)
 * I forgot to mention, you can also use your secure paypal merchant ID in the paypal
   email field (it works the same way except it uses your merchant ID).
 *  Thread Starter [George](https://wordpress.org/support/users/quantum_leap/)
 * (@quantum_leap)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/encode-email-address/#post-9986832)
 * Brilliant, paypal merchant ID worked as expected!
 * Thanks for your fast reply and help!
 *  Thread Starter [George](https://wordpress.org/support/users/quantum_leap/)
 * (@quantum_leap)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/encode-email-address/#post-10034046)
 * Hi, I hope you don’t mind reopening this ticket. Basically the merchant ID works
   if you have only one email connected to an account. Currently I would like to
   accept donations to the same account but from a different email address so I 
   cannot use the merhcant ID this time(because the original merchant ID email would
   be visible to the Paypal checkout page instead).
 * I tried adding the filter as you suggested to encode the email”
 *     ```
       function override_merchant_email( $pp_email ) {
       $pp_email = ae_encode_emails( $pp_email );
       return $pp_email;
       }
       add_filter('paypal_donations_merchant_email', 'override_merchant_email');
       ```
   
 * but all that does is it encodes the emails in hex characters befote the plugin
   output thus rendering the page with errors (and no footer).
 * Basically, as I said in the first post I would like to encode the email after
   it has been entered in the plugin admin page. Would that be possible?
 *  Thread Starter [George](https://wordpress.org/support/users/quantum_leap/)
 * (@quantum_leap)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/encode-email-address/#post-10034067)
 * It’s ok, I made it work! All I had to do is register the **eae_encode_emails()**
   function to it.
    `add_filter('paypal_donations_merchant_email', 'eae_encode_emails');`
 * Cheers!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Encode email address’ is closed to new replies.

 * ![](https://ps.w.org/paypal-donations/assets/icon.svg?rev=994082)
 * [Donations via PayPal](https://wordpress.org/plugins/paypal-donations/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/paypal-donations/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/paypal-donations/)
 * [Active Topics](https://wordpress.org/support/plugin/paypal-donations/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/paypal-donations/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/paypal-donations/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [George](https://wordpress.org/support/users/quantum_leap/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/encode-email-address/#post-10034067)
 * Status: resolved