*** HAPPY - Helpdesk Support Ticket System Changelog *** 2026.09.05 - version 2.0.6 - Fixed: Closed tickets deny view (and downloads) for guest-token and share-link visitors; logged-in customers can still view but not reply; staff access unchanged - Added: Reply `@kb:` Knowledge Base mention for supporters/managers — Visual + Text autocomplete inserts a title link with permalink - Fixed: Reply Text (Quicktags) toolbar no longer throws `Cannot read properties of undefined (reading 'code')` when clicking buttons such as code - Fixed: Quicktags toolbar hidden again on the Visual tab (CSS no longer forces it visible over TinyMCE) - Fixed: Reply TinyMCE — toolbar buttons work again (restore content-box sizing inside the editor UI) - Fixed: Switching Text → Visual no longer throws a JS error after inserting HTML such as `` (safe paste/setContent handlers; allow `code`/`pre` elements) - Updated: Frontend and admin ticket screens enqueue the WordPress editor scripts for the reply form - Updated: Email template appearance now includes a separate Heading text color setting; by default the heading text uses the same color as the email body text 2026.09.02 - version 2.0.5 - Fixed: Unanswered digest email subject no longer appends the HTML ticket list (`
`, links); subject stays plain text (e.g. Unanswered tickets (3)) - Fixed: Staff/admin replies email the ticket creator again (merge default Enable for reply notifications; resolve requester email from subscription / user / form fields) - Updated: Frontend ticket list Last Replies column shows last-reply user name to the left of the time (staff + customer lists) - Updated: Email template — less empty space above/below the message; heading shown when set 2026.08.29 - version 2.0.4 - Fixed: Ticket title no longer shows escaped quotes/backslashes (e.g. `\\\"Data invalid\\\"`); `wp_unslash` on create-ticket fields + `happy_normalize_ticket_subject()` on display/save/email - Fixed: Reply editor — inline images by http(s) URL only; strip base64/blob `` on save (`happy_strip_non_link_images_in_html`); no server-side convert - Updated: Reply TinyMCE — `paste_data_images` false; strip data/blob images on paste; hide Image description / title fields (`image_description`, `image_title`) 2026.08.28 - version 2.0.3 - Fixed: Reply TinyMCE no longer jumps scroll to the top while typing long content - Fixed: Ticket status settings — create/customer-reply/supporter-reply/close apply the selected status; “Don't change” is value 0; closing via a reply also sets `date_closed` 2026.08.22 - version 2.0.2 - Fixed: Guest tickets using an email that already belongs to a WordPress user still receive staff-reply emails (no skip when the address matches a registered account) - Fixed: Auto-close now writes Closed status in the database (verified after the notice reply) so tickets are not left as Pending - Fixed: Auto-close / unanswered checks run at the shorter of the cron interval and the inactivity hours (Pending tickets waiting on the customer are not skipped until the next 12-hour cron) - Fixed: Guest tickets — staff replies now email the guest address with `{ticket_url}` including `guest_token`; last-reply placeholders use the supporter who just replied (not “A guest”) - Fixed: Reply page dates use the site timezone (happy_date_i18n no longer double-applies gmt_offset on current_time timestamps) - Fixed: Create ticket category — Assign Supporter is saved (implode user IDs before DB insert, same as edit/save) - Fixed: Ticket list filters — changing category/problem/status/supporter/search resets to page 1 (avoids empty list while counters still show) - Fixed: Category/problem/supporter filter counters match the default list (exclude Closed/Resolved), not only Urgent/Pending/Processing - Fixed: Auto-close cron no longer stalls when some matching tickets cannot be closed; re-check inactivity cutoff on fresh ticket data; clear orphaned `_happy_auto_closed` on still-open tickets - Added: New tickets auto-subscribe supporters from category Assign Supporter; they also receive the create-ticket admin email - Fixed: `[happy_working_hours]` “Your time” clock works in widgets on any page (standalone working-hours CSS/JS; not only Happy pages) - Fixed: Email bodies keep line breaks (TinyMCE no longer collapses them onto one line); placeholders such as {ticket_id}, {ticket_url}, {reply_content}, {all_field} are replaced more reliably - Added: Settings → Tickets — Detect visitor country on/off (default on); when off, skip lookup and hide flags - Added: Admin Happy List Tickets — delete tickets (row action + bulk, support managers only), with confirmation; ticket delete also removes replies and meta - Added: Settings → Pages → Author slug (default `author_`) for author profile URLs under List Tickets; legacy `happy_` URLs still work - Updated: Happy author “Save Canned” clones unassigned shared replies to the supporter (original unchanged); assigned personal copies are overwritten; same list used on reply ticket - Added: Canned shortcodes `{ticket_id}` (zero-padded per Tickets settings), `{cursor}` (caret on insert; works when `{cursor}` is on its own line) - Fixed: Canned replies keep blank lines on save/reload/insert; avoid double-`wpautop` and invalid empty-content saves - Updated: System Status — report DB schema version, email master switch, auto-close/unanswered, author slug + URL pattern, canned reply counts, close status - Fixed: Ticket detail responsive — Ticket information drawer on tablet/mobile (≤1024px), matching list-tickets compact breakpoint - Updated: WooCommerce My Account Tickets badge — supporters/managers: open tickets awaiting staff reply (assigned or not); customers: tickets awaiting their reply after staff replied; light-red circle badge matching menu text height - Fixed: Closed tickets append `[#CLOSED]` to the title; customers/guests cannot reply (form hidden + submit blocked); changing status to Closed sets `date_closed` - Fixed: Newly created tickets no longer show “Ticket closed” / block customer replies when Close ticket status matches After ticket created - Fixed: Create-ticket textarea line breaks are stored and shown on the ticket (and in emails) - Fixed: Category Conditions — textarea fields listed; changing form/field dropdowns; keyword match (Vietnamese); Assign Form hides value column after save - Fixed: Support Manager includes all Supporter permissions plus higher (all tickets, assign, KB/FAQ others & taxonomies) - Added: `happy_user_has_min_role()` / `happy_get_role_rank()` — manager rank always covers supporter - Added: `inc/happy-content-capabilities.php` — grant KB/FAQ caps from Happy roles (supporter and manager can edit all KB/FAQ posts; WooCommerce admin access allowed) - Fixed: Support Manager was treated as a customer in `check_user_can_read_ticket` - Fixed: Admin ticket list — supporters see assigned/own tickets only; Assign + filter-by-supporter are manager-only - Fixed: PHP 8+ white screen risk — avoid `$current_user->ID` on null; hard-require KB/FAQ caps class; safer ticket list queries - Fixed: reCAPTCHA v3 create-ticket form — no longer renders `happy-recaptcha-align` (removes empty gap; v3 stays invisible with hidden token only) - Updated: Happy author ticket list keeps desktop one-row table layout (like list tickets; no narrow/card stack on profile sidebar width) - Updated: Happy author “Your canned replies” only for supporters and support managers (own profile) - Added: Supporters and support managers can edit Knowledge Base and FAQs in wp-admin (all posts, categories/tags, media; WooCommerce does not block admin) - Updated: Happy author page ticket list matches the main list-ticket table (status, topic, bulk actions, etc.) without the right-hand filter panel - Added: Ticket detail — reply author name links to the Happy author page when the viewer may open that profile - Fixed: Working Hours shortcode — “Your time” clock loads on any page (dedicated `working-hours` CSS/JS enqueued from `[happy_working_hours]`, not only Helpdesk pages) 2026.08.17 - version 2.0.1 - Fixed: Auto-close cron no longer posts inactivity reply on tickets already closed/resolved or with `date_closed` set (fresh status check + `_happy_auto_closed` guard) - Fixed: Ticket detail — `[#CLOSED#]` only when status is the configured close status (int/string-safe); strip leftover marker from subject; close action sets status + `date_closed` and clears ticket cache - Fixed: Reply ticket — hide canned response HTML list under the dropdown; tighten Quicktags toolbar button styles - Fixed: Form builder — `Cannot set properties of undefined (setting 'settings')` when updating section/element editing state - Fixed: Create ticket with reCAPTCHA enabled — v3 token on submit + hidden submit flag so tickets save; verify only when captcha widget can render - Updated: WooCommerce My Account tickets badge loads lightweight `wc-account-tickets-badge` CSS instead of full `frontend.css` - Updated: `problem-form` CSS/JS load only on create-ticket page or `happy_forms` / `happy_single_form` shortcodes (filter `happy_should_load_problem_form_assets`) - Fixed: Form builder Add Element — restore column width picker (100%/50%/33%/25%) after choosing a field, including when adding on a new row/section - Fixed: Form builder — cannot add field (`elements.length` on undefined section); normalize form sections/elements in admin localize - Fixed: Create ticket form layout/CSS — body styles target form wrapper, scoped box-sizing, default field padding; no longer soft-404 for Woo order gate - Fixed: Create New Ticket page soft-404 when WooCommerce “Order required” defaulted on or customer had no orders; Order required now defaults off; clearer notice instead of 404 - Fixed: WooCommerce Order required — administrators, support managers, and supporters can see/create tickets without having orders (filter `happy_woo_skip_order_requirement`) - Fixed: PHP 8.1 compatibility — null-safe explode/trim/strtolower; guard get_userdata/get_user_by before property access - Added: Global Enable email notifications switch (Settings → Email); master off stops all plugin emails (`enable_email_notifications`, filter `happy_emails_enabled`) - Added: Unanswered Ticket digest — one email per recipient with the full unanswered list (`{unanswered_ticket_list}`, `{unanswered_ticket_count}`); action `happy_unanswered_tickets_digest_sent` - Added: Email settings — placeholder guide + clearer section/event descriptions - Fixed: Email placeholders replace correctly (`{ticket_url}`, `{reply_content}`, `{guest_token}`, `{subject}`, …); guest/customer emails append guest access token to ticket URL - Fixed: `{ticket_url}` no longer depends on Support page being set (uses `happy_get_ticket_permalink` fallback) - Fixed: Admin bar “View list tickets” under Site Name — link missing when Support page was front page or had no valid permalink - Updated: New install List Ticket page default slug is `list-tickets` (`post_name`) - Added: Working Hours → per-day “Day off” checkbox (Fill skips Day off days); Our/Your clocks + Official hour GMT use WordPress site timezone; Your time = browser/OS local - Added: Appearance → Widgets → List Tickets area (top of tickets column; hidden when empty); registered early so it appears in block Widgets UI - Updated: Shortcode `[happy_working_hours]` (replaced `[happy_working_hour]`); Holiday Start/End use Y-m-d date pickers; auto-delete expired holiday events (default on) 2026.08.05 - version 2.0.0 - Updated: Shortcode `[happy_working_hour]` renamed to `[happy_working_hours]` - Updated: Working Hours → Holiday date fields use full date pickers (`start_date` / `end_date`, Y-m-d) - Added: Working Hours → Auto-delete expired holiday events (default on; cron + settings + save) - Added: Auto-close cron interval setting (`auto_close_cron_interval_hours`, default 12 hours; min 1, no max) - Added: Secondary DB indexes on ticket/replies/meta/attachments tables; schema version option `happy_helpdesk_db_version` - Added: Filters `happy_should_load_frontend_assets`, `happy_load_frontend_assets_fallback`, `happy_auto_close_cron_interval_hours`, `happy_close_ticket_status_id`, `happy_canned_replies_limit` - Updated: Defaults — auto-close after 72h, unanswered alert 24h, cron every 12h - Updated: Frontend assets load only on Helpdesk pages/shortcodes/endpoints (no global theme script dequeue) - Updated: Ticket list uses setting `tickets_per_page`; queries use COUNT instead of SQL_CALC_FOUND_ROWS; batch status/category/attachment helpers - Updated: Cron maintenance deferred to shutdown (+ fastcgi_finish_request when available) - Fixed: Customer email body stored under `content` (migrate from legacy `to_address.custom_email`) - Fixed: Holiday shortcode empty-check operator; validation/upload messages wired; settings save no longer stores `do_action`/`html` noise - Fixed: Restored Settings UI for `user_upload_folder` and `my_tickets_page`; email template color defaults - Added: Auto-close tickets after N hours without customer reply (with optional close reply message); 0 = disabled - Added: Unanswered ticket alert — email admin after N hours without supporter reply; 0 = disabled (Email → Unanswered Ticket) - Added: Ticket list row classes for overdue no-response tickets (`happy-ticket-overdue`, `happy-ticket-unanswered-overdue`, `happy-ticket-awaiting-customer-overdue`) - Added: Extensibility — lifecycle `do_action` / `apply_filters` across tickets, replies, email, cron, access, lists, settings, FAQ/KB (see docs/HOOKS.md) - Added: WooCommerce create form — require order + order item when Order required; show Order / Order item on ticket content - Fixed: Style settings (table header/footer + tickets/replies pagination colors, custom CSS) now apply on the frontend - Fixed: Auto-close tickets — query now targets supporter last-replies, paginates safely, and runs via WP-Cron + traffic fallback (`auto_close_cron_interval_hours`) - Fixed: Close Ticket email is only sent on auto-close (controlled by “Send email on auto-close”); manual status changes no longer send email - Fixed: Frontend tickets-per-page (cookie/request) respected in AJAX list refresh - Fixed: WooCommerce order/item values submit correctly when selects sit outside the form (`form` attribute); item dropdown JSON escape; fields stacked one per row - Added: Reports admin page — tickets created by day/month/year with status and category charts - Added: WordPress dashboard widget — today’s tickets by form/category and completed count - Added: System Status admin page (WordPress, server, plugin tables, pages) with support request form emailed to support@villatheme.com - Added: Ticket title display format settings (padded ID, custom placeholders) in Tickets settings - Added: Category counters on ticket list filters (Pending + Processing + Urgent) - Added: Problem counters on ticket list filters (Pending + Processing + Urgent) - Added: Frontend ticket list — filter by supporter (support managers only) with active-ticket counters - Added: Admin tickets list — Select All and Shift+click range selection - Added: Admin tickets list — bulk Assign to supporters (multi-select) - Added: Bulk actions — Add categories / Remove categories (admin list + frontend supporter list) - Added: Frontend ticket list — Supporter column and bulk Assign supporters (support managers only) - Added: Ticket information — assign supporters (support managers only); new tickets start unassigned - Added: Share ticket — Restricted / Shared with unique share link; view and reply without login; replies attributed to ticket owner - Added: Admin tickets list — filter by supporter - Added: Admin tickets list — sortable columns and Screen Options for visible columns - Added: Admin ticket detail — “View ticket” button opens the frontend ticket URL - Added: Pretty permalinks for tickets (`/{list-page}/{id}-{slug}/`) and author profile (`/{list-page}/happy_{username}/`) - Added: Theme template overrides via `{theme}/happy-helpdesk-system/` (child → parent → plugin) - Added: Guest ticket access via secure `_guest_token` links (email `{guest_token}`, thank-you page, view/reply without login) - Added: Knowledge Base directory layout with live search (`[happy_list_kb layout="directory"]`) - Added: FAQs accordion layout grouped by category with search (`[happy_list_faq layout="accordion"]`) - Added: Descriptions for all settings fields and sections - Added: Permalinks settings for Knowledge Base / FAQs base slugs (Settings → Permalinks) - Added: Editable Knowledge Base and FAQs archive subtitles in Page settings - Updated: Ticket list title shows formatted ID + subject (e.g. #000001 Title); same on ticket detail - Updated: Default ticket list hides Closed and Resolved tickets until filtered by status - Updated: Ticket list default sort by status priority (Urgent → Pending → Processing → Resolved → Closed), then latest update - Updated: Hide categories, problems, and supporters with zero active-ticket counters in list filters - Updated: Removed ID column from ticket list; ID is shown in the Topic title - Updated: Ticket list pagination — page counter and tickets-per-page on the same row; matched font sizes with reply editor - Updated: Ticket replies (frontend + admin) — chat-style cards; customer left, supporter right with sky-blue border - Updated: Frontend ticket reply — reply form always visible (removed show/hide reply toggles) - Updated: Create ticket — “Back to Tickets” above the form (top-left), outside the form card - Updated: Clearer Email and Page settings copy / shortcode help - Updated: Removed `[CANNED]` label from replies when using a canned response - Updated: Frontend ticket list (mobile ≤782px) — card layout for managers; status icon on same row as title - Updated: Frontend ticket list (mobile) — Filter panel opens as left drawer with dark overlay - Updated: Ticket detail (mobile, supporters) — Ticket information opens as right drawer with dark overlay - Updated: Frontend bulk Assign / Categories selects (mobile) — multi-select expands and dropdown pushes content down - Updated: List filter counters (status/category/problem/supporter) — transient cache (5 min) with invalidate on ticket/meta change - Updated: Admin tickets list — status/category maps + batched subscription/users (no per-cell `new Happy_*`) - Updated: Ticket detail replies — batch-load reply author map (user/avatar/role) - Updated: Frontend assets — DataTables no longer enqueued on frontend (unused); admin list pages unchanged - Updated: Google reCAPTCHA v2/v3 — server verify (`happy_verify_recaptcha`); create-ticket verify only when form Captcha is enabled; v3 min score filter; lost-password protected - Fixed: Administrator blocked from creating tickets by WooCommerce order check - Fixed: Empty Problem column when ticket has no/invalid form ID - Fixed: Bulk status change UI when selecting tickets - Fixed: Knowledge Base / FAQ archive titles no longer show “Archives:” prefix - Fixed: Single Knowledge Base — views count and linked categories display - Fixed: reCAPTCHA v2 onload callback registered before Google script; create form requires site + secret keys - Updated: `[happy_working_hour]` — card layout (status Online/Offline outline badges, official hours summary, live Your/Our clocks); no solid red/green fills - Added: WooCommerce My Account → Tickets menu shows a red badge with the customer’s Pending ticket count - Added: Widget area “List Tickets” at the top of the frontend ticket list (above filters); supports shortcode widgets - Fixed: Settings page ViSelect2 crash (`No ViSelect2/compat/inputData`) when KB/FAQ subtitle text fields shared `helpdesk-page` class — Working Hours “New event” works again 2026.06.26 - version 1.0.12 – Updated: Compatible with WP 7.0 2026.03.07 - version 1.0.11 - Fixed: Fixed some error 2025.12.12 - version 1.0.10 - Fixed: Fixed security – Updated: Compatible with WP 6.9 2025.11.26 - version 1.0.9 - Fixed: Fixed security 2025.10.15 - version 1.0.8 - Fixed: Fixed security 2025.08.02 - version 1.0.7 - Fixed: Fixed security 2025.07.26 - version 1.0.6 – Updated: Update support class – Updated: Compatible with WP 6.8.2 and WC 10.0.3 2025.04.18 - version 1.0.5 – Updated: Update support class – Updated: Compatible with WP 6.8 and WC 9.8 - Fixed: Fixed display FAQs list 2025.02.28 - version 1.0.4 – Updated: Min file – Updated: Compatible with Wc 9.7 and WP 6.7.2 – Updated: Update support class 2025.01.03 - version 1.0.3 - Dev: Add filter hook 'helpdesk_user_role_administrator' , 'helpdesk_get_users_role_administrator' - Updated: Compatibility check with WP 6.7.1 and WC 9.5 2024.11.18 - version 1.0.2 - Added: Add more allowed file type - Updated: Compatibility check with WP 6.7 and WC 9.4 - Updated: Update hook compatible with add ons for Envato - Fixed: Resolved the issue where not all items in WooCommerce orders were displayed. 2024.08.28 - version 1.0.1 - Fixed: Fixed some error 2024.08.06 - version 1.0.0 ~ The first released.