Woocommerce get order key
<p>I have orders in the format <code>[domain]/checkout/order-received/[order_number]/key=[wc-order-key]</code> - how do I get <code>[wc-order-key]</code>?</p>

<p>So far I've done:</p>

<pre><code>add_action('woocommerce_payment_complete', 'custom_process_order', 10, 1);

function custom_process_order($order_id)
{
  $order = new WC_Order( $order_id );
  $myuser_id = (int)$order-&gt;user_id;
  $user_info = get_userdata($myuser_id);
  $items = $order-&gt;get_items();
  foreach ($items as $item)
  {
    $product_name = $item['name'];
    $product_id = $item['product_id'];
    $product_variation_id = $item['variation_id'];
    $product_description = get_post_meta($item['product_id'])-&gt;post_content
  }
  return $order_id;
}
</code></pre>