How can I get usernames to include the plus symbol (+)?

I'm working on a demonstration site that includes WooCommerce.

As I've been testing with my gmail account, I've been using the plus symbol to denote my testing email address. For example, when buying a product, I'm selecting 'register' at the time of purchase, with an email address like so:

my.gmailaddress+test@gmail.com

The theme I'm using appears to use this email as the username, automatically, and without the option for me to edit it as it's created. The problem comes when the plus symbol is stripped (santisied) as it's turned into the username. As a user I have very little idea this is happening behind the scenes, and I'm more than a little frustrated when I can't login with my email address, for no known reason.

My question:

Can the WP username sanitisation be tweaked to allow for the plus symbol to be maintained?

Or, failing that, can the username be manually set at the time that I register in the purchase process? Is this likely to be a function of the Theme or WooCommerce, or WP itself?

Cheers,
Dave

  • Zyniker
    • WordPress Warrior

    Would you mind providing a link to your site? It might be easier to tell which software package is generating the registration pages with a link to those pages. Most WordPress-related software allows for registration which includes both username and email address selection, it seems odd that your page is simply using the email address as the username.

  • dave_turnbull
    • New Recruit

    Hi - thanks for this.

    The draft site is set up here: http://waitiricreek.daveturnbull.co.nz

    All the content is bogus, as I'm just trying to test the basic WooCommerce and WP user flow. Including the forgot password flow, which is where I came across the issue (my email address wasn't recognised as the forgot password and user log in seem to be failing when I use the full email, including the plus symbol).

    If you add an item to your cart, then choose to register for an account as part of the checkout process, and use a plus symbol in your email, then try and log in or retrieve your password, you'll get the same issue.

    Cheers!
    Dave

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.