WooCommerce: Check if Product / Variation ID is in the Order

Once a customer places an order, you might want to know if such an order contains a given product or variation ID. You can use this for tracking purposes, for redirecting to a custom thank you page or running your custom functions.

You can also run the check in the admin or in your custom functions, as long as you have access to the order ID or order object.

Enjoy!

Continue reading WooCommerce: Check if Product / Variation ID is in the Order