title: 500 Internal Error in ajax request
body: <p>So I have this script</p>
  
  <pre><code>&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" &gt;
  
  window.onload = function(){
  
          var request = $.ajax({
          url: "../wp-content/plugins/woocommerce/admin/test.php",
          type: "GET",            
          dataType: "html"
          });
  
          request.done(function(msg) {
              $(".recent-orders").html(msg);          
          });
  
          request.fail(function(jqXHR, textStatus) {
              alert( "Request failed: " + textStatus );
          });
  
  }
  </code></pre>
  
  <p>and my test.php file.</p>
  
  <pre><code>    $args = array(
      'numberposts'     =&gt; 8,
      'orderby'         =&gt; 'post_date',
      'order'           =&gt; 'DESC',
      'post_type'       =&gt; 'shop_order',
      'post_status'     =&gt; 'publish'
  );
  $orders = get_posts( $args );
  if ($orders) :
      foreach ($orders as $order) :
  
          $this_order = new WC_Order( $order-&gt;ID );
  
          echo '
          &lt;li&gt;
              &lt;span class="order-status '.sanitize_title($this_order-&gt;status).'"&gt;'.ucwords(__($this_order-&gt;status, 'woocommerce')).'&lt;/span&gt; &lt;a href="'.admin_url('post.php?post='.$order-&gt;ID).'&amp;action=edit"&gt;' . get_the_time( __( 'l jS \of F Y h:i:s A', 'woocommerce' ), $order-&gt;ID ) . '&lt;/a&gt;&lt;br /&gt;
              &lt;small&gt;'.sizeof($this_order-&gt;get_items()).' '._n('item', 'items', sizeof($this_order-&gt;get_items()), 'woocommerce').' &lt;span class="order-cost"&gt;'.__('Total:', 'woocommerce' ) . ' ' . woocommerce_price($this_order-&gt;order_total).'&lt;/span&gt;&lt;/small&gt;
          &lt;/li&gt;';
  
      endforeach;
  endif;
  </code></pre>
  
  <p>Yes, that is from woocommerce. I'm trying to get another set of products and add it into ul list. But I get this 500 internal server error every time I request.</p>
  
  <p>I'm using LAMP server to test and I've already tested it in a hosted server. The error persists. </p>
  
  <p>Any help or idea will be appreciated. The javascript works because I've tested it with just an echo of a string and it place it on the recent-order ul. </p>