Get all Orders IDs from a product ID

How can I get an array with Order IDs by Product ID?

I mean receive all orders where specific product is presented.

I know how to do this by MySQL, but is there a way to do this by WP_Query function?

Read more here: Get all Orders IDs from a product ID

Leave a Reply

Your email address will not be published. Required fields are marked *