retrieve cross sell product in woocommerce
<p>I have been here for the last 5 hours trying to figure out something. I need to be able to fetch the cross sell id of a product in the woo commerce in the order confirmation email. Up to now I have</p>

<pre><code>         $items = $order-&gt;get_items(); 
        foreach ( $items as $item ) {
            $product_id = $item['product_id'];
            }   
</code></pre>

<p>And this retrive the id of the product. As there is always just going to be one cross sell product how can I get the id of that product in a variable?</p>

<p>This will be the last part of an affiliated program I am building for a guy but I now if fetches the purchased product id and I need the cross-sell one.</p>