Custom code strips @ character from email address

WordPress Event Management, Calendars & Registration Forums General Question Custom code strips @ character from email address

This topic contains 2 replies, has 2 voices, and was last updated by  Ronya Banks 10 years, 2 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #14321

    Hi Stephen,

    You sent me some plugin code for altering a PayPal account on a per-event basis. (See
    http://wp-event-organiser.com/forums/topic/altering-paypal-settings-per-event.

    Unfortunately, the PayPal email address returned by the function has its @ character stripped, so, for example,
    name@company.com becomes namecompany.com.

    I tried a few temporary hacks, such as simply simply setting the $email variable to the exact string for the particular email address and even
    commenting out ‘sanitize_email(), but the @ stripping still occurred.

    Do you know how I could remedy this?

    Thanks,
    Suzanne (web developer for Ronya Banks)
    suzannemhahn@gmail.com

    Ronya Banks
    #14322

    Hi Suzanne,

    Try replacing $email in the return add_query_arg(... line by urlencode( $email ).

    Stephen Harris
    #14323

    It works!!

    Thank you!!!

    Ronya Banks
Viewing 3 posts - 1 through 3 (of 3 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.