Wednesday, March 18, 2015

raw query plan to get woocommerce order by specific user


First go to postmeta table with user id then you will get order id as post id then with those post id go to order_itemmeta table to get order details in row then with that order_itemmeta table you will get order_item_id with meta value, this meta value is your product id you can now get that product info by that product id in posts table now make a join query to get all those thing in one table :) Good luck!

No comments:

Post a Comment

Workflow of WordPress project in a team with Git

1. We should not push any Wordpress core folders or files to github. 2. Only push custom theme and custom plugin into github. 3. So, in this...