HPOS – Get orders containing a specific “product_id” using wc_get_orders() method
I need to get a list of all orders for some specific product ids. Currently, I’m doing a custom SQL query, but I want to make my plugin compliant with HPOS tables and new CRUD system.