Allow multiple user accounts to be created having the same email address - woocommerce - wordpress

Does anyone know how disable the function in Woocommerce that disallows users to share the same email address when checking out.
I have managed to allow a user to share the same email address in Wordpress, but when the user checks out using Woocommerce it says email address already in use.
I would like to disable that function in Woocommerce, so that users can share the same email address.

This might help http://wpquestions.com/question/showChrono/id/9960 I understand it may be what you are looking for in terms of altering the core way WC handles duplicate emails/accounts.

Related

Woocommerce + GSuite - Transactional emails best practices? Anyone?

I've lost my brain the last couple of days trying to find the best solution for handling my transactional woocommerce emails, so that customers and store managers (on G Suite at the same domain as my site) get notified of new orders, etc.
TL;DR: I have a Woocommerce and want the next e-mail behavior and I wonder what's the best way to achieve this:
Have woocommerce emails don't go to my customer spam folders and get
notified to store.manager#mydomain.com and myemail#mydomain.com
G-Suite email accounts.
Use the info#mydomain.com and "MyDomain" as the "from email and name" in WooCommerce. Whether the info#mydomain.com is an e-mail
alias of my G-Suite email or a server side e-mail I don't care. What
I don't want is to configure a new G-Suite email just to serve
transactional e-mails.
So I'll describe my original situation, problem and the solutions I've read about:
When I setup the Woocommerce e-mails in settings, using a #mydomain.com email account two things happened:
Customers would receive the e-mails on their spam folder.
Store managers did not receive any e-mails whatsoever.
We also have this context info that might be of help:
We are just starting as an e-commerce, so no big load of emails...
We use the cheapest G-Suite plan (with up to 5 accounts) with our domain in Google Domain, so I don't want to use one of those account just to handle the transactional e-mails.
So I found the alias option and setup different aliases to both send and receive e-mails. E.g: "info#mydomain.com".
I read the official Woocommerce email-FAQ, and a bunch of other links in the Wordpress Forums and Stack Overflow, I came to find this three courses of action:
Setup split delivery and let my transactional e-mail address run from C-Panel.
Use an SMTP Plugin and set it up to use the Gmail API.
Create a subdomain and set WooCommerce/PHPServer to send the emails and just use my G-Suite emails as recipients.
I've read tons, and find myself in a loop where I don't know what's the best, future proof option, but this is what I've tried for every option:
I desisted on the idea of split delivery as soon as I found the e-mail aliases option in GSuite.
I did activated it and it solved one of my two problems, customers were no longer getting my emails to spam, but the Gmail API won't let me change the "from address" nor even the "from name", unless I select the alias as the default e-mail address on Gmail, which is not something I want; and if the alias (set up as mailer) and recipient is the same, then GSuite won't show the email in the inbox, but in the sent folder (and marked as read). So If the store manager email (storemanagername#mydomain.com) has an alias used to send Woocommerce emails (info#mydomain.com) he won't be notified for new orders.
I configured a domain alias on my Google Admin settings as a subdomain (store.mydomain.com) (which generates a new email alias with that subdomain) then I created a subdomain on my hosting provider (pointed at nothing for the moment) and had my hosting setup the Google MX records for my subdomain. Without the SMTP Plugin it does nothing, regardless of which e-mail I put in the from and recipient fields on the WooCommerce settings. With the SMTP Plugin things kind of work, using the alias#subdomain.mydomain.com as the recipient, as emails do arrive to inbox (instead of the sent folder) but doubled the regular mail and a huge postmaster notice, about how the domain alias "subdomain.mydomain.com" doesn't exist.
As a related note: Google per default generates a test domain alias which is mydomain.com.test-google-a.com when I use the alias e-mail with this alias domain recipient in woocommerce and the regular G-Suite in the from field on Woocommerce things pretty much work, except that my customers still get the emails to their spam folders.
How would I setup mailgun or sendgrid to use info#mydomain.com as the sender e-mail address? Would that work better?
I'm not new to wordpress, but definitely I'm a noob at WooCommerce and email protocol, setup in general.
Do you think you might exceed the G Suite sending limits? That'd push you towards the SendGrid/Mailgun/etc. solution for outgoing info#mydomain.com mail, with G-Suite accepting the incoming mail however you'd like. Though if it's important to avoid "reply-to" type addresses, make sure to choose a provider/plan that supports running off your domain (SendGrid calls it "domain authentication", Mailgun calls it "domain verification", etc.).
That will likely also solve that initial problem you described in your point #2 (assuming it was due to mail being treated as local-to-the-web-server).
If you take that approach, make sure to triple-check your SPF/DKIM/DMARC setup. And depending on which provider you go with, some of their WordPress/WooCommerce integration plugins are...not great. I've been working on summarizing the providers and their plugins if it's of any help.
And I had a little trouble following who needs to get copies of what, but there's the woocommerce_email_headers filter if it would be helpful to BCC the store managers. You could even do it selectively.

woocomerce - admin is not received any email when order is placed

I have set all parameters in woocomerce -> settings-> email-> new order , processing etc but email is not sended to admin or email id which i have provided in these option. Yes, email is sending to customer which has purchase items of site. Means email is working for customer but not for admin.. I have tried to change status of order but still mail is sended to customer but not admin. Can you help me to get out of this.
Thanks
Try deactivating all other plugins besides WooCommerce to see if that helps. WooCommerce uses the wp_mail provided by WordPress. As long as other emails are sent, this one should be sent.
A few things to look for:
Make sure New Order emails are enabled in WooCommerce > Settings > Emails > New Order.
Be sure the order is not placed on Pending Order. Keep in mind those emails are not sent to you since the order hasn't been completed yet thus no email.
A spam blocker might be the cause of the issue. The best way to avoid this try a dedicated SMTP provider like Mandrill which resolves most issues with emails not sending from the host. Mandrill has a free plugin.
Hope that helps!
Is it the WordPress admin email? I've just had this problem on version 4.1; i was not able to use the wordpress admin email as recipient of emails from new orders; but any other email i set for recipient when new orders worked just fine; all except the wordPress admin email. Weird hu? I guess i'll have to deal with that later.

Change WooCommerce recipient for admin emails

Is there a way to change the recipient email address for all WooCommerce emails that normally go to the site administrator?
The reason for doing this is a separation of roles. The site administrator deals with security alerts, new registrations, password resets, and general site duties. We have another user that is responsible for the online store. All WooCommerce "admin" emails should go to this other person, not the email address specified in Settings --> General.
Ideally, this would be setup in the user profile or WooCommerce settings. I don't have an issue hard-coding the email address in some hook or filter.
I don't think this is possible without editing core WooCommerce files, and that is not recommended as that would be overwritten next update.
The admin email seams to fetched like this get_option( 'admin_email' ) everywhere and there is not filter manipulate this.
The best solution might be to ask for a filter (on their GitHub).
This should be possible:
In the WooCommerce section on the dashboard, there is a setting option
In that there is an Emails tab.
In the Email Sender Options section, change/add the ""From" Email Address" to the other users emails address.
Save the changed made

How can I get rid of spam users

The company I work for have a small Plone blog. But we have a problem with spam accounts. We use captcha on the site and Plone sends a mail to the users that they must confirm before they can edit the user profile. Still about 600 spam users are created every day. In the Plone user profile they paste all kinds of commercial links.
We are located in Denmark and the blog is in danish, therefore I have made a script to delete all users with a non danish mail adress. But even though most of the real users have a danish mail account I probably still deletes some real users when running the script.
The spam users register from a vide range of ip-adresses, so blocking ip's is not an option.
Does anyone have ideas to what to do about this problem?
Disable Plone comments/public user creation and use a third party commenting service such as Disqus.
They somehow trick recaptcha (if you find out, please let me know :)
But how do they do the email validation? They don't have to. Plone join_form has a hidden field for password which is filled by this bot and Plone saves it as the real password (check the REQUEST object comming from this bot)
So the bot doesn't need to check email for password. That's how they get in and activate those accounts. So fix the hidden password field from join_form.
Then, remove all users that have links in their profile description (as a real user you don't do that, do you?). Also don't let the users to input HTML within their profile description.

Wordpress hook/event/action for when a users updates it's email address

Is there any hook/event/action/method that fires when a user updates it's email address?
I need to do certain actions from my plugin when a user updates it's email address.
Is there a way to check for that from my plugin without altering Wordpress's core?
There's not a lot of information out there, but I think your best bet might be writing a custom function and use the profile_update hook to compare old data with new. If the current email is different than the old, you've got your solution.
Edit: Link to WordPress' Documentation

Resources