This is a fairly complex development topic. I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.
I can also recommend the following places for more development-oriented questions:
- WooCommerce Slack Community: https://woocommerce.com/community-slack/
- WooCommerce FB group: https://www.facebook.com/groups/advanced.woocommerce/
Now I have had some progress, I can get object_ID from orders list, searching by category. Now I need additional data:
order number; Object_ID; object name; description; rented from date; rented to date; order status; client name; client aadress
I would really appreciate if someone could help me 🙂
MySQL ia have now:
SELECT DISTINCT tr.object_id
FROM iqpe_term_relationships tr
INNER JOIN iqpe_term_taxonomy tt
ON tr.term_taxonomy_id = tt.term_taxonomy_id
INNER JOIN iqpe_terms t
ON tt.term_id = t.term_id
INNER JOIN iqpe_woocommerce_order_itemmeta oim
ON tr.object_id = oim.meta_value
INNER JOIN iqpe_woocommerce_order_items oi
ON oim.order_item_id = oi.order_item_id
INNER JOIN iqpe_posts as o
ON oi.order_id = o.ID
WHERE tt.taxonomy = ‘product_cat’
AND t.slug = ‘jaana-ou’
AND oim.meta_key = ‘_product_id’
AND o.post_type = ‘shop_order’
AND o.post_status IN (‘wc-completed’,’wc-processing’)
-
This reply was modified 5 years, 10 months ago by
booklysql.