/**
  *   handle ajax message responses
  *
  * @access protected
  * @param bool $empty_cart
  * @param string  $redirect_url
  * @return void
  */
 protected function send_ajax_response($empty_cart = false, $redirect_url = '')
 {
     $grand_total = EE_Registry::instance()->CART->get_grand_total();
     $grand_total->recalculate_total_including_taxes();
     $empty_cart = $empty_cart || EE_Registry::instance()->CART->all_ticket_quantity_count() < 1 ? true : false;
     // if this is an ajax request AND a callback function exists
     if ($this->_ajax === true) {
         // grab updated html for the event cart
         $new_html = array('tbody' => '<tbody>' . $this->_get_event_cart() . '</tbody>');
         if ($empty_cart) {
             $new_html['.event-cart-grand-total'] = '';
             $new_html['.event-cart-register-button'] = '';
         }
         // just send the ajax
         echo json_encode(array_merge(EE_Error::get_notices(false), array('new_html' => $new_html, 'mini_cart' => EED_Multi_Event_Registration::get_mini_cart())));
         // to be... or...
         die;
     }
     EE_Error::get_notices(false, true);
     $redirect_url = !empty($redirect_url) ? $redirect_url : add_query_arg(array('event_cart' => 'view'), EE_EVENT_QUEUE_BASE_URL);
     wp_safe_redirect($redirect_url);
     exit;
 }