In Woocommerce I am trying to find out how to get the product id for a completed order inside the Customer completed order email template to store it as a PHP variable. This way I will be able to insert it into an external database.
I already tried $product->get_id();
but it does not work.
How can get the Product ID in WooCommerce 3+ from email templates?