title: Get the order id in woocommerce_new_order hook
body: <p>why don't can get id order in new order ?</p>
  
  <p>This code don't work</p>
  
  <pre><code>add_action( 'woocommerce_new_order', 'get_order_details_woo',  1, 1  );
  function get_order_details_woo ($order_id)
  {
  
      $order = wc_get_order( $order_id );
  
      foreach ($order-&gt;get_items() as $item_key =&gt; $item_values):
  
          $item_id = $item_values-&gt;get_id();
  
          $item_data = $item_values-&gt;get_data();
  
          $product_name = $item_data['name'];
  
          //echo $product_name;
      endforeach;
  
  }
  </code></pre>
  
  <p>But this code is work</p>
  
  <pre><code> add_action( 'woocommerce_new_order', 'get_order_details_woo',  1, 1  );
  
      function get_order_details_woo ()
      {
  
          $order = wc_get_order( 100);
  
          foreach ($order-&gt;get_items() as $item_key =&gt; $item_values):
  
  
              $item_data = $item_values-&gt;get_data();
  
              $product_name = $item_data['name'];
  
              //echo $product_name;
  endforeach;
  
      }
  </code></pre>
  
  <p>How get id in new order ?</p>
  
  <p>Get new order details if i don't have order id ?</p>