title: WooCommerce Get Order Product Details Before Payment in Plugin
body: <p>I need to display order details from cart before payment in plugin.</p>
  
  <p>I work on one plugin what connect woocommerce and an payment API and there I need to send array of product details like product ID, name, description, quantity and individual amount.</p>
  
  <p>My problem is that I can't find right hook to get all data properly.</p>
  
  <p>How can I get this data?</p>
  
  <p>Thanks</p>
  
  <h2>UPDATE</h2>
  
  <p>Here is update based on anwers for everyone who need it:</p>
  
  <pre><code>add_action('woocommerce_checkout_process', 'woocommerce_get_data', 10);
  function woocommerce_get_data(){
  
          $cart = array();
          $items = WC()-&gt;cart-&gt;get_cart();
          foreach($items as $i=&gt;$fetch){
              $item = $fetch['data']-&gt;post;
  
              $cart[]=array(
                  'code'        =&gt; $fetch['product_id'], 
                  'name'        =&gt; $item-&gt;post_title, 
                  'description' =&gt; $item-&gt;post_content, 
                  'quantity'    =&gt; $fetch['quantity'], 
                  'amount'      =&gt; get_post_meta($fetch['product_id'], '_price', true)
              );
          }
  
          $user = wp_get_current_user();
  
          $data = array(
              'total' =&gt; WC()-&gt;cart-&gt;total,
              'cart'  =&gt; $cart,
              'user'  =&gt; array(
                  'id' =&gt; $user-&gt;ID,
                  'name' =&gt; join(' ',array_filter(array($user-&gt;user_firstname, $user-&gt;user_lastname))),
                  'mail' =&gt; $user-&gt;user_email,
              )
          );
  
          $_SESSION['woo_data']=json_encode($data);
  
      }
  </code></pre>
  
  <p>Thanks to @loictheaztec and @raunak-gupta</p>