/**
  * This function currently returns HTML for a list table of all the products a user is on the waitlist for, with a
  * link through to the product to remove themselves. I would suggest this can
  * be refactored and possibly moved to the Waitlist Object. The HTML output could be removed also and placed within
  * filters
  *
  * @access public
  * @return string The HTML for the waitlist table
  * @since 1.1.3
  */
 public function current_user_waitlist()
 {
     if (!$this->User) {
         return;
     }
     $waitlist_products = WooCommerce_Waitlist_Plugin::get_waitlist_products_by_user_id($this->User->ID);
     $content = '<h2 class="my_account_titles">' . __('Your Waitlist', 'woocommerce-waitlist') . '</h2>';
     if (is_array($waitlist_products) && !empty($waitlist_products)) {
         $cached_product = $this->Product;
         $content .= '<p>' . __('You are currently on the waitlist for the following products.', 'woocommerce-waitlist') . '</p><table class="shop_table"><tbody>';
         foreach ($waitlist_products as $post) {
             $content = $this->return_html_for_each_product($post, $content);
         }
         wp_reset_postdata();
         $this->Product = $cached_product;
         $content .= '</tbody></table>';
     } else {
         $content .= '<p>' . __('You have not yet joined the waitlist for any products.', 'woocommerce-waitlist') . '</p>';
     }
     return $content;
 }