Posted on Leave a comment

WooCommerce Orders in WordPress Database

Orders are a Custom Post Type (CPT), so they are stored in the wp_posts table. If you search the post_type field for ‘shop_order’, SQL will retrieve all orders.

Then, you must search the wp_postmeta table for all the records with post_id matching the id of the order post. Among the fields you will then find in the wp_postmeta table will be the entire shipping and billing addresses