How to get the entire order object from WooCommerce

  • 31 January 2022
  • 1 reply
  • 345 views

Userlevel 3
Badge +1

WooCommerce is a very flexible e-commerce tool, and for some of us, that means using a variety of plugins with product options and extra fields that don’t necessarily make it through the usual Zapier interface.

Here’s a solution which has worked for me reliably with several sites for several years. I hope some of you will find it helpful:

Instead of using the Zapier feed, have WooCommerce send a New Order email to Zapier, and parse the subject line to extract the order number.

Use that order number in a Code step along with the WooCommerce API to retrieve the entire order object. It will come in as a JSON string which you can parse and dereference to get everything your plugins provide.

Yes, it will take a little exploration of the order object to get all the data, as different plugins structure the data in different ways, but the WHOLE ORDER is there. Nothing is missing, nothing is obscured.

Have fun!


1 reply

Userlevel 7
Badge +9

Ooh, very nifty! Thanks so much for sharing this, @RisoSystems! 🎉

Reply