On HPOS enabled sites, filtering the subscriptions list table by the subscription's next payment, start, end, trial end, or last payment date all failed to correctly sort the table.
This PR makes use of those changes in WC to make sure we format the meta query args to ensure the list table is sorted by those meta values. Specially making sure we set the meta_key and meta_value order by properties.
Fixes #200 Fixes #471
Description
On HPOS enabled sites, filtering the subscriptions list table by the subscription's next payment, start, end, trial end, or last payment date all failed to correctly sort the table.
This originally required changes to WC core to fix, however with https://github.com/woocommerce/woocommerce/pull/36403 merged and released for some time, ordering the list table by meta value is now possible.
This PR makes use of those changes in WC to make sure we format the meta query args to ensure the list table is sorted by those meta values. Specially making sure we set the
meta_key
andmeta_value
order by properties.eg:
How to test this PR
trunk
you'll notice the table isn't correctly ordered.Product impact