1

I am using WooCommerce as an ordering system online.

I will be having many categories for each products. How can I allow the admin or the shop manager to filter the orders page by product category?

I'm currently using the plugin "WooCommerce Filter Orders by Product" however, I am lost in the SQL queries used in showing these items.

I was able to show the categories using only a SQL query however it doesn't work in the dropdown menu.

SELECT wp_terms.term_id,wp_terms.name 
FROM wp_terms 
LEFT JOIN wp_term_taxonomy 
ON wp_terms.term_id = wp_term_taxonomy.term_id 
WHERE wp_term_taxonomy.taxonomy = 'product_cat' 
  • Have you researched the topic before posting the question? – Max Yudin Feb 23 '18 at 12:17
  • @MaxYudin I have. There is an existing plugin that also does that however, it has a price. I'm trying to edit the code of the plugin itself. – spy91 Feb 24 '18 at 12:20
  • Your edits will disappear with the first plugin update. Here are results of 20-second research. – Max Yudin Feb 24 '18 at 12:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.