Trying to find the WooCommerce orders information in the database could be a daunting task for a newbie, but it’s actually easier than you might think.

Just like the WooCommerce products, the orders are also just a custom post type, which means they can be found under the wp_posts table. One way of finding them is to search the database for shop_order under the column post_type.

As the wp_posts table provides limited information about the order, the rest of the information can be found under wp_postmeta.

The table wp_posts provides information such as:

  • Post ID
  • Post Author
  • Post Date
  • Post Title – in this case the date of the order
  • Post Status – which is the status of the order (ie. Processing, Completed, Cancelled, Refunded, Failed, Pending or On Hold)

The most important field here is probably the ID, which is used to search against in the wp_postmeta table. There you can find information such as:

  • Order Key
  • Customer User
  • Payment Method
  • Customer IP Address
  • Customer User agent
  • Billing Information
  • Shipping Information
  • Cart Discount
  • Order Shipping Cost
  • Tax Information
  • Order Total
  • and information added in by other plugins

If this short guide answered (or not) your question, please feel free to let us know, or ask us further questions in the comments section.

Published by Dragos Micu

WooCommerce

Leave a Reply

Your email address will not be published. Required fields are marked *