How to display SQL query that ran in WC_Order_Query?
WC_Order_Query does not store a record of the SQL it generated, or the WP_Query that it used internally. So it’s not possible to get the information you need from WC_Order_Query directly. You could try using $wpdb->last_query immediately after using the class or function, but the last query more than likely isn’t the one you’re actually … Read more