WooCommerce uses a custom post type “shop_order” to store orders. This means that the orders will be stored in the wp_posts database table with the post_type column set to shop_order
SELECT ID, post_author, post_date, post_status, post_type FROM wp_posts
WHERE post_type="shop_order"
WooCommerce stores a large portion of the order related data as post meta.
Once you have the order ID, you can find the customer data by searching the wp_postmeta table by the order ID
SELECT * FROM wp_postmeta WHERE post_id = $currentUser
Find more info https://usersinsights.com/woocommerce-customer-database/
Related Posts:
- WooCommerce: Can’t use wc_get_products for custom REST API endpoints
- How to remove an action within a class with extends
- Display WooCommerce size product attribute on shop page
- Create WooCommerce custom stock option that is non-purchasable
- Query multiple post type and categories
- Shipping restrictions with WooCommerce variable products
- WooCommerce – Flat rate shipping based on X quantity steps?
- woocommerce_before_calculate_totals in woocommerce 3.0
- Custom URL for each product variation – rewrite rules
- Change “Shipping” text to “Delivery” everywhere I appears in woocommerce
- Customize WooCommerce orders displayed shipping
- Display a list subcategories under the main product category thumbnails?
- Unable to programmatically remove product from WooCommerce cart
- creating product with variations using woocommerce REST API
- How to Change WooCommerce Variable product pricing by SKU or visible children id
- Is it possible to cache ?wc-ajax=get_variation
- Adding extra one email address who receives email as admin – woocommerce
- Woocomerce language
- How to set default values in Woocommerce checkout? [closed]
- Display list of categories that contain products with a specific tag
- Payment methods are not displaying in Woocommerce
- How to display empty stars on products with woocommerce?
- Product admin page breaking with too many product variations [closed]
- Add content to the last slide of each product
- Remove add to cart icon/view product button woocommerce
- Product options/variations notice displays as an Alert [closed]
- Expired session error (admin) when I try to make a call to WooCommerce api [closed]
- Hide decimal on hompage, category and product page
- Get order_id from the product_id in woocommece [closed]
- Shipping methods in dropdown instead of radio buttons [closed]
- How to increase execution time out limit in WordPress dashboard?
- 600k of option_name “c_facebook_background_product_sync_job”
- Woocommerce get the Archive/Category slug of the current category page
- Woocommerce Variable Product – Please choose product options… [closed]
- woocommerce_order_status_completed not working
- Woocommerce. Max weight per order based on shipping class
- Make order notes field at woocommerce checkout only viewable on front end by Admin level user role [closed]
- How to apply these filters
- get_the_post_thumbnail_url does not return anything if image size is set
- Woocommerce – auto logout after payment
- Display SKU for each Single product title in group product!
- How can I add a so i can show sale price under normal price
- WooCommerce checkout page price break down table hook
- How can I compel alphanumeric entries for username textbox on woocommerce registration form
- Help me to intergrate product database to WordPress
- Using the WordPress and WooCommerce REST APIs in the same Node app
- how to change add to cart button to call for price button in one of product variation?
- Next/Previous Product with custom order by price & products inside the product category [closed]
- Display list of only specific tags on product
- Change the “Register” headline in Woocommerce
- How to display customer mobile number in woocommerce customers page
- Submitting product attributes via Ninja Forms wordpress?
- Get all categories inside a Product Tag archive page
- Migrating WordPress + WooCommerce from server to Local
- wp-cron and woocommerce subscriptions killing performance
- How to Add “parent category description” in Woocommerce sub category page if there is no description available for child category
- Woocommerce – Hide shipping at all, if only certain product or products with certain shipping class is in the cart
- Running JavaScript after using WooCommerce Filter Plugin
- Include stock information in WooCommerce order confirmation email
- Woocommerce product query not working in other WPML languages
- Woocommerce get attributes
- Add custom field address_3 before city in user profile
- How to upload very large JPGs to Media Library for WooCommerce digital download prints
- use vendor address instead of store main address for shipping and taxes calculation
- where does $checkout in form-checkout.php woocommerce come from? [closed]
- Get $order in wp_head
- Update WooCommerce stock status with SQL query if stock value is greater than 0
- How to find which last line executed in wordpress?
- How to trace errors in debug.log for WooCommerce 3.0?
- Forgot password flow does not work, getting email with a link but after clicking link it’s not working
- Html code is not showing in woocommerce shop page on adding in header.php?
- Is this code collecting user password?
- Select all products that have a custom field ‘is_new’ set to ‘Yes’
- Removing Product from Woocommerce checkout page using Ajax
- add_post_meta on subcription renewal
- login or register then access woocommerce website
- Replace product link with just product name on WooCommerce downloads page
- Woocommerce Product category base same as product base causes 404
- Importing Attributes in to Woocommerce
- woocomerce products and categories don’t display fixed
- Update Custom Post Meta Even if Draft
- Woocommerce Shipping based on condition and cart value
- Clone and modify Woocommerce Products catalog
- Update order status based on condition
- Custom CSS Not working on Product page
- How to add ajax loading icon after click add to cart button on woocommerce
- WooCommerce Table Rates not splitting up
- How can I let the user choose size of a shoe in the store? [closed]
- Hide/show specific products for backend users in woocommerce
- I’d like to add a button under the “Add to Cart” button which says “Buy on Amazon” and links to my Amazon product page [closed]
- If YITH Wishlist page is set to the WooCommerce my-account endpoint, the endpoints stop working all together. Any solution?
- WooCommerce pay per photo upload [closed]
- Override woocommerce template from parent theme
- Create custom add to cart in WordPress
- Woocommerce checkout column total too small can not get it wider [closed]
- WooCommerce – How to add a custom field to only a specific email template [closed]
- Send data to external websites when there is an update or create a post
- how should i get products based on tags in woocommerce
- Add custom text to product category page
- Woocommerce permalink URL change in DB