Tell us what you are trying to do? I need to make a view for the admin, listing all orders.
Is there any documentation that you are following? Yes, I understand I have to make the "order" post-type public.
I have used https://toolset.com/forums/topic/woocommerce-orders-4/ but the line number no longer corresponds to my version of Woocommerce, which is 3.3.3. Please point me in the right direction. I noticed that in views, I could select "orders" (why would that be if the post-type is private?) and I could also (since views version 1.8.0) filter by third party custom-statuses like wc-completed. So it seems that all this is almost supported. For security reasons I was planning to use Access for limiting access to the page that contains the order view.
Is there a similar example that we can see? No. It does not work yet.
Thank you, but I was already using that method. In the meantime I have found the reason for not getting any results. I was displaying fields which were not in the order post-type. I had assumed that "product" was a parent of "order" so that I could also display, sort and filter by product-fields. On further investigation it became clear that product is not a parent of order, but a parent of order-item. One order can have multiple order-items, each connected with a different product.
My ultimate goal is to display order-items, together with order-info and product-info (both parents). In this site, the products are training-events. We want to select those events that are in the past together with the orders in which they occur, so that we know which clients should receive a certificate. However, in views I do not seem to be able to select the post-type "order-items". Why is that? Once this becomes possible, how can I add information from both parent post-types?
WooCommerce has a custom post type "shop_order" for orders, but the order items are not posts, there is no such post type as order-items, which is why you cannot select it.
You will find a custom database table wp_woocommerce_order_items that stores the order items, and a related table to store item meta.
Custom tables are not accessible to Toolset. You can only access data from the standard WordPress tables such as wp_posts, wp_postmeta, and the taxonomy and user tables.