Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
Patrick Heiloo

Order WooCommerce orders by meta field AND date

Hi guys,

I’m working on a WooCommerce store with custom sorting based on a meta field (_shipping_delivery_date). HPOS is not enabled.
All orders are sorted by the meta value (_shipping_delivery_date), for example:
– 06-09-2024
– 06-09-2024
– 06-09-2024
– 07-09-2024
– 08-09-2024

I would like to sort the orders in WordPress by the meta field AND by post_date (order date).
First the orders need to be sorted by the meta value like in my example above. Then I would like to show the newest order of that day first and later orders after.
Sorting by the meta field value works fine, but I can’t figure out how to sort by post_date as second sorting option.

Here is a screenshot of what I would like to achieve: https://qore.digital/screenshots/admin-columns-pro-sorting.png

Hopefully you can help me out! Ps. if needed, I can add a custom function to achieve the sorting.

Thanks in advance!

1 month, 1 week ago
Stefan van den Dungen Gronovius
Developer

Thanks for your feedback.
Unfortunately, there is no way to sort on multiple columns on the WordPress tables.
At least not in the way WordPress has implemented sorting for their tables. \
Since our plugin works on top of the WordPress tables, it is also not possible with our plugin.
We have no plans at this moment to support this in the near future.

1 month ago

You must be logged in to reply to this topic.