Add WooCommerce customer data into database

I think this is a long shot but does anyone know how i can automatically add customerdata into my database after they have succesfully made an order via WooCommerce?

I now get a confirmation e-mail with the customer data and I have to insert the data manually into the database. I think some function triggers the e-mail and puts the information in the e-mail, but I can’t figure out where this file/function is located.

Read More

Can someone help me?

Related posts

Leave a Reply

2 comments

  1. I have finally found it! This works with guest checkouts as well. In the file woocommerce > includes > api > class-wc-api-orders.php I found al the properties of ‘$order’.

    After that, I made a new template of the e-mail I receive after the order is submitted via the the wordpress dashboard: Woocommerce > E-mails > New order > Template. On that page, Woocommerce gives the path of the template php file. In this php file, I added some code to add all the order properties in the database.