title: How to display WooCommerce downloads table using PHP code or Shotcode
body: <p>I'm trying to display woocommerce download table on the dashboard endpoint. After studying the woocommerce download endpoint file i notice woocommerce uses the below code to display the download table;</p>
  
  <pre><code>$downloads     = WC()-&gt;customer-&gt;get_downloadable_products();
  $has_downloads = (bool) $downloads;
  
  do_action( 'woocommerce_before_account_downloads', $has_downloads ); ?&gt;
  
  &lt;?php if ( $has_downloads ) : ?&gt;
  
      &lt;?php do_action( 'woocommerce_before_available_downloads' ); ?&gt;
  
      &lt;?php do_action( 'woocommerce_available_downloads', $downloads ); ?&gt;
  
      &lt;?php do_action( 'woocommerce_after_available_downloads' ); ?&gt;
  
  &lt;?php else : ?&gt;
      &lt;div class="woocommerce-Message woocommerce-Message--info woocommerce-info"&gt;
          &lt;a class="woocommerce-Button button" href="&lt;?php echo esc_url( apply_filters( 'woocommerce_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) ) ); ?&gt;"&gt;
              &lt;?php esc_html_e( 'Go shop', 'woocommerce' ); ?&gt;
          &lt;/a&gt;
          &lt;?php esc_html_e( 'No downloads available yet.', 'woocommerce' ); ?&gt;
      &lt;/div&gt;
  &lt;?php endif; ?&gt;
  
  &lt;?php do_action( 'woocommerce_after_account_downloads', $has_downloads ); ?&gt;
  </code></pre>
  
  <p>what I want to achieve is to display the 5 latest downloads in table format. will like to know how to limit this action <code>&lt;?php do_action( 'woocommerce_available_downloads', $downloads ); ?&gt;</code> to only display the latest 5 downloads.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>This is the download table in the Woocommerce Download Endpoint Page
  <a href="https://i.stack.imgur.com/Slenm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Slenm.png" alt="enter image description here"></a></p>
  
  <p>in which I want to display the same exact table structure on the dashboard endpoint page</p>
  
  <p><a href="https://i.stack.imgur.com/J2MXA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/J2MXA.png" alt="enter image description here"></a></p>