View order by product category
-
I’m a programmer ,and I have 2 questions:
In the admin order page(
wp-admin/edit.php?post_type=shop_order
), I would like to add a view by product category (&category=waiter
).- In order to create the view, I’m using the
views_edit-shop_order
hook. The easiest would be to use the$the_order
variable to get the item, and itsproduct_id
to get theproduct_cat
term.
However, when this hook is invoked,$the_order
is still NULL.
How can I overcome this obstacle? - How would I filter the orders in that view? Can I run a query the returns only orders with items in a certain category?
Thank you!
- In order to create the view, I’m using the
Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
- The topic ‘View order by product category’ is closed to new replies.