title: How to get order->price in woocommerce
body: <p>I'm trying to get 'order price' and other detail.</p>
  
  <p>but the <code>$order-&gt;get_order_total</code> return nothing and no error appear.</p>
  
  <p>How to get order meta and detail?</p>
  
  <pre><code>add_action( 'woocommerce_thankyou', function($order_id){
  
    global $wpdb;
    global $woocommerce;
    $order = new WC_Order($order_id);
  
    if ( $order-&gt;status != 'failed' ) {
      $wpdb-&gt;show_errors = TRUE;
      $wpdb-&gt;suppress_errors = FALSE;
  
      $table_name = $wpdb-&gt;prefix . "Arvand_Marketing";
      $amount =  $order-&gt;get_order_total;
      $user_market = get_post_meta( $order-&gt;id, 'extra-field', true );
      $wpdb-&gt;insert( $table_name, array( 'email' =&gt; '$user_market', 'amount'=&gt;'$amount') );
  
      if ($wpdb-&gt;last_error) {
        die('error=' . var_dump($wpdb-&gt;last_query) . ',' . var_dump($wpdb-&gt;error));
      }
    }
  
  });
  </code></pre>