Just found there are two attributes indicating the customers email related to a specific order, which are "contact_email" and "email". What the differences between them?
If I want to retrieve an order by both order name and the email address, which one should I use? Also consider the customer may checkout as a guest, which field is mandatory when customer making an order?
Thanks in advance
In most cases you'll find the email and contact_email on an order being the same thing, even if someone is checking out as a guest they'll still need to provide either an e-mail address or phone number depending on the shop's settings.
The main difference between the two is that in the event an email isn't provided on an order the email field won't be populated, but contact_email will consider other information like a customer account's email address so that the field doesn't necessarily end up being blank.