title: Display a warning message in a shortcode for users without an order
body: <p>In the functions.php file I have this shortcode which shows the download button of the last order placed by a woocommerce customer. Everything works fine for customers who have bought something, however if a customer has no downloads or no order, the layout breaks. I suppose this happens because there is nothing to be displayed.</p>
  <p>So I would like to display a message for those who have no download or have not placed an order, I tried with else but it didn't work.</p>
  <p>Sorry but I'm relatively new to php, can anyone help me figure out how to introduce a warning message?</p>
  <pre><code>add_shortcode( 'order_download' , 'last_order_info_08' );
  function last_order_info_08( $downloads ){
      
  $customer = new WC_Customer( get_current_user_id() );
  $last_order = $customer-&gt;get_last_order();
  $downloads = $last_order-&gt;get_downloadable_items();
  
  if ($downloads) {
      wc_get_template(
          'button-downloads.php',
          array(
              'downloads'  =&gt; $downloads,
              'show_title' =&gt; true,
          )
      );
  }
  }
  </code></pre>