on-internet
← Community

How to filter orders with nested OR meta_query using wc_get_orders with HPOS enabled?

Stack Overflow ·

I am currently updating a custom WooCommerce plugin to make it fully compatible with High-Performance Order Storage (HPOS / Custom Order Tables). In our plugin, we have custom order fields such as _delivery_date, _is_priority, and _is_express. The goal of the query is to retrieve processing orders for a specific delivery date that are marked as either priority or express. Previously on traditional WooCommerce installations with wp_postmeta, we used wc_get_orders() with a nested meta_query combining AND and OR relations. Here is the query we are running: $args = array( 'limit' => 20, 'status' =

Comments

Sign in or sign up to comment and upvote.

No comments yet.