title: Access the order object from woocommerce_order_details_after_order_table hook
body: <p>In WooCommerce, I am making a custom merchant plugin and I have added this hook:</p>
  
  <pre><code>add_action( 'woocommerce_order_details_after_order_table', 'track_me' );
  </code></pre>
  
  <p>Inside the <code>track_me()</code> function, I want to <strong>retrieve the order</strong> to do some things.  </p>
  
  <p>The function does what I want when I want, but I'm currently getting the <code>order_id</code> from the URL which seems janky.</p>
  
  <p>I cannot figure out how to properly retrieve the <code>$order</code> object or the <code>$order_id</code> which would be enough.</p>
  
  <p>It's almost certainly something obvious as hours of searching the Internet has been fruitless. I just don't know what the obvious something is...</p>
  
  <p>UPDATE 1: Following the advice of @LoicTheAztec, I did the following:</p>
  
  <pre><code>do_action( 'woocommerce_order_details_after_order_table_items', $order );
  
  class Order_MY extends WC_Order
  {
      function __construct() 
      {
          add_action( 'woocommerce_order_details_after_order_table', array( $this, 'track_me' ) );
      }
  
      function track_me( $order ) 
      { 
          // My code here
      }
  }
  </code></pre>
  
  <p>The first place the script fails is on the do_action line where PHP complains $order is an undefined variable.</p>
  
  <p>The script also fails at extending WC_Order: Class 'WC_Order' not found</p>
  
  <p>New question... is there something I need to do to make sure I have access to the woocommerce classes in my plugin?</p>