I using Woocommerce and actually I receive order notifications only to one email. I would like to receive notifications about orders in 2 different emails depending on customer location:
- For customer from zone 1 (Germany) I would like to receive the email notifications at
Mail #1 (mail1@mail.com)
,
- For all other zones like zone 2 (Mexico) I would like to receive the email notifications at
Mail #2 (mail2@mail.com)
.
I looking for some functions on net, but I was find only funtcions to send to two email adresses, but without any If condition.
What I will need is something like that:
if ($user->city == 'Germany') $email->send('mail1@mail.com')
else $email->send('mail2@mail.com')
Which hook can I use to get this working?
Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…