How to use Ongoing Date Field
-
My sql query:
SELECT IFNULL((Select WPP.post_id FROM wp_postmeta WPP WHERE WPP.post_id = WP_WC.order_id GROUP BY WPP.post_id),"") AS OrderNumber, IFNULL((Select date_format(post_date,'%Y-%m-%d') FROM wp_posts WP_PS WHERE WP_PS.Id = WP_WC.order_id GROUP BY WP_PS.id),"") AS OrderDate, IFNULL((Select date_format(post_date,'%Y-%m-%d') FROM wp_posts WP_PS WHERE WP_PS.Id = WP_WC.order_id GROUP BY WP_PS.id),"") AS OrderDate2, FROM wp_wc_order_product_lookup WP_WC, wp_woocommerce_order_items WP_I WHERE WP_WC.order_item_id = WP_I.order_item_id AND WP_WC.order_id = WP_I.order_id AND (Select post_date FROM wp_posts WP_PS WHERE WP_PS.Id = WP_WC.order_id GROUP BY WP_PS.id) >= '2021-04-01' %%WHERE%%
`
In fields settings:
1. Add field. Field name: OrderDate (Date type)
2. Select Searchable and Filterable (optional) YES
3. Ongoing Date Field (optional) put OrderDate2 (I also try with Ongoing Default Filter Value (optional) field)
4. Result not found.Other case:
1. Add field. Field name: OrderNumber (Text type)
2. I put value in Default Filter Value (optional)
3. Also result not found.
- The topic ‘How to use Ongoing Date Field’ is closed to new replies.