This tutorial will allow you to create advanced queries to build a personalized administration page and which gives you advice on how to administer your store by simply using the data that the Woocommerce plugin makes available to you and the powerful query engine integrated with the component.
Filter products by custom attributes
Create your advanced queries to filter the products
Under the ‘Queries’ tab you will find the four fields necessary to build a query by direct entry into the fields or by using the dynamic tags specially developed for Woocommerce as well as the list of field keys available for the single products.
Show products in a price range
Select key: regular_price Data type: Numeric Comparison operator: BETWEEN Select values: 300|600
Number of products sold
Select key: total_sales Data type: Numeric Comparison operator: ‘>=‘ Select values: 1
Number of products in stock
Select key: stock_quantity Data type: Numeric Comparison operator: ‘>‘ Select values: 1
Triggering threshold for low quantity products
Select key: low_stock_amount Data type: Numeric
Select key: date_on_sale_to Data type: TimeStamp Comparison operator: ‘>‘ Select values: today
Out of stock products
Select key: stock_status Data type: Char Comparison operator: Like Select values: out
Select key: review_count Data type: Numeric Comparison operator: ‘>=’ Select values: 1
Stock level not managed
Searches for all products whose stock is not managed.
Select key: manage_stock Data type: Char Comparison operator: ‘=’ Select values: no