| @@ -254,9 +254,9 @@ | ||
| 254 | 254 | |
| 255 | 255 | if (!defined('FLUENT_SUPPORT_PRO_DIR_FILE')) { |
| 256 | 256 | $secondaryItems[] = [ |
| 257 | 257 | 'key' => 'upgrade_to_pro', |
| 258 | - 'label' => 'Upgrade to Pro', | |
| 258 | + 'label' => __('Upgrade to Pro', 'fluent-support'), | |
| 259 | 259 | 'permalink' => Helper::getUpgradeUrl('sidebar_cta') |
| 260 | 260 | ]; |
| 261 | 261 | } |
| 262 | 262 | |
| @@ -324,9 +324,9 @@ | ||
| 324 | 324 | add_action('admin_head', function () { |
| 325 | 325 | Vite::injectViteClient(); |
| 326 | 326 | }, 1); |
| 327 | 327 | |
| 328 | - wp_enqueue_script('dompurify', $assets . 'libs/purify/purify.min.js', [], '3.4.13'); | |
| 328 | + wp_enqueue_script('dompurify', $assets . 'libs/purify/purify.min.js', [], '3.4.16'); | |
| 329 | 329 | |
| 330 | 330 | if (is_rtl()) { |
| 331 | 331 | wp_enqueue_style('fluent_support_admin_app_rtl', $assets . 'admin/css/alpha-admin-rtl.css', [], FLUENT_SUPPORT_VERSION); |
| 332 | 332 | } else { |
| @@ -444,9 +444,9 @@ | ||
| 444 | 444 | 'lastEntry' => '', |
| 445 | 445 | 'asset_url' => $assets, |
| 446 | 446 | 'support_agents' => $agents, |
| 447 | 447 | 'agent_groups' => $agentGroups, |
| 448 | - 'support_products' => Product::select(['id', 'title'])->get(), | |
| 448 | + 'support_products' => Product::select(['id', 'title'])->orderedByTitle()->get(), | |
| 449 | 449 | 'client_priorities' => Helper::customerTicketPriorities(), |
| 450 | 450 | 'ticket_statuses' => Helper::ticketStatuses(), |
| 451 | 451 | 'ticket_statuses_group' => Helper::ticketStatusGroups(), |
| 452 | 452 | 'changeable_ticket_statuses' => Helper::changeableTicketStatuses(), |
| @@ -456,14 +456,18 @@ | ||
| 456 | 456 | // `mailboxes` is restriction-filtered and can legitimately be empty, so it cannot |
| 457 | 457 | // double as the "is Fluent Support set up yet?" signal the setup wizard keys off. |
| 458 | 458 | 'has_mailboxes' => MailBox::count() > 0, |
| 459 | 459 | 'me' => $me, |
| 460 | + // Deleting a customer needs fst_sensitive_data plus administrator rights unless | |
| 461 | + // the site turns the administrator part off. | |
| 462 | + 'customer_delete_requires_admin' => (bool) apply_filters('fluent_support/customer_delete_requires_admin', true), | |
| 460 | 463 | 'pref' => [ |
| 461 | 464 | 'go_back_after_reply' => 'yes' |
| 462 | 465 | ], |
| 463 | 466 | 'notification_integrations' => $integrationDrivers, |
| 464 | 467 | 'internal_notification_settings' => (new NotificationSettings())->get(false), |
| 465 | - 'server_time' => gmdate('Y-m-d\TH:i:sP'), | |
| 468 | + // Site time, like every date the API sends; relative times compare the two. | |
| 469 | + 'server_time' => current_time('mysql'), | |
| 466 | 470 | 'has_email_parser' => defined('FLUENTSUPPORTPRO_PLUGIN_VERSION'), |
| 467 | 471 | 'ticket_tags' => $tags, |
| 468 | 472 | 'i18n' => $i18ns, |
| 469 | 473 | 'custom_fields' => apply_filters('fluent_support/ticket_custom_fields', []), |
| @@ -489,8 +493,10 @@ | ||
| 489 | 493 | } |
| 490 | 494 | |
| 491 | 495 | $appVars['has_pro'] = defined('FLUENTSUPPORTPRO_PLUGIN_VERSION'); |
| 492 | 496 | $appVars['version'] = FLUENT_SUPPORT_VERSION; |
| 497 | + // Single source of truth for upgrade CTAs; the SPA only re-points utm_content on this. | |
| 498 | + $appVars['upgrade_url'] = Helper::getUpgradeUrl(); | |
| 493 | 499 | if ($appVars['has_pro']) { |
| 494 | 500 | $appVars['agent_feedback_rating'] = Helper::getBusinessSettings('agent_feedback_rating', 'no'); |
| 495 | 501 | $appVars['open_ai_integration'] = Helper::openAIIntegrationStatus(); |
| 496 | 502 | } |