PluginProbe
Fluent Support – Helpdesk & Customer Support Ticket System / 2.4.5
Fluent Support – Helpdesk & Customer Support Ticket System v2.4.5
2.4.5 2.4.0 2.3.2 2.3.1 2.3.0 2.2.1 2.2.0 trunk 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.4.0 1.4.1 1.4.2 1.4.5 1.4.6 1.4.7 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 All 69 releases
← All changes | app/Services/Integrations/FluentForm/FeedIntegration.php +13 -11 1.10.1 → 2.4.5 View file →
@@ -161,9 +161,9 @@
161 161 ],
162 162 $this->getCustomField(), //Getting Fluent Support Custom Field To Map
163 163 [
164 164 'component' => 'html_info',
165 - 'html_info' => __('<h4>Please provide the ticket provider info. If user is logged in then it will use that info. For Public users you can set your customer info</h4>', 'fluent-support')
165 + 'html_info' => '<h4>' . __('Please provide the ticket provider info. If user is logged in then it will use that info. For Public users you can set your customer info', 'fluent-support') . '</h4>'
166 166 ],
167 167 [
168 168 'key' => 'CustomerFields',
169 169 'require_list' => false,
@@ -292,9 +292,10 @@
292 292 continue;
293 293 }
294 294
295 295 if( $type=='checkbox' && array_key_exists($slug, $ticketCustomField)) {
296 - $ticketCustomField[$slug] = explode(',', Arr::get($ticketCustomField, $slug));
296 + $value = Arr::get($ticketCustomField, $slug, '');
297 + $ticketCustomField[$slug] = $value ? explode(',', (string)$value) : [];
297 298 } else {
298 299 $ticketCustomField[$slug] = Arr::get($ticketCustomField, $slug);
299 300 }
300 301 }
@@ -301,13 +302,14 @@
301 302
302 303 $ticketData = [
303 304 'product_source' => 'local',
304 305 'mailbox_id' => Arr::get($data, 'list_id'),
305 - 'title' => sanitize_text_field(wp_unslash(Arr::get($data, 'ticket_title'))),
306 - 'content' => wp_unslash(wp_kses_post(Arr::get($data, 'ticket_content'))),
306 + // Feed settings and entry values are stored unslashed, so sanitize only.
307 + 'title' => sanitize_text_field(Arr::get($data, 'ticket_title')),
308 + 'content' => wp_kses_post(Arr::get($data, 'ticket_content')),
307 309 'attachments' => sanitize_text_field(Arr::get($data, 'ticket_attachments')),
308 - 'client_priority' => strtolower(sanitize_text_field(Arr::get($data, 'client_priority'))),
309 - 'priority' => strtolower(sanitize_text_field(Arr::get($data, 'client_priority'))),
310 + 'client_priority' => strtolower(sanitize_text_field(Arr::get($data, 'client_priority', ''))),
311 + 'priority' => strtolower(sanitize_text_field(Arr::get($data, 'client_priority', ''))),
310 312 'custom_fields' => $ticketCustomField,
311 313 'source' => 'web'
312 314 ];
313 315
@@ -390,8 +392,9 @@
390 392
391 393 do_action('fluentform/log_data', [
392 394 'title' => $feed['settings']['name'],
393 395 'status' => 'success',
396 + // translators: %d is the ticket ID number
394 397 'description' => sprintf(__('Support ticket has been created at Fluent Support. Ticket ID: %d', 'fluent-support'), $ticket->id),
395 398 'parent_source_id' => $form->id,
396 399 'source_id' => $entry->id,
397 400 'component' => $this->integrationKey,
@@ -449,13 +452,12 @@
449 452 'is_media_library' => $isMediaLibrary,
450 453 'attachment_id' => $attachmentId
451 454 ]);
452 455 } catch (\Exception $e) {
453 - error_log("Failed to create attachment record: " . $e->getMessage());
456 +
454 457 }
455 458 }
456 459 } catch (\Exception $e) {
457 - error_log("Error processing attachment: " . $e->getMessage());
458 460 continue;
459 461 }
460 462 }
461 463
@@ -479,12 +481,12 @@
479 481 private function isBlockedCustomer($customerEmail)
480 482 {
481 483 $customer = Customer::where('email', $customerEmail)->first();
482 484
483 - if('inactive' == $customer->status || !$customer->status) {
484 - return true;
485 + if (!$customer) {
486 + return false;
485 487 }
486 488
487 - return false;
489 + return $customer->isBlocked();
488 490 }
489 491
490 492 }