← All changes
|
app/Services/Integrations/FluentForm/FeedIntegration.php
+6
-5
2.2.1
→
2.4.5
View file →
| @@ -302,10 +302,11 @@ | ||
| 302 | 302 | |
| 303 | 303 | $ticketData = [ |
| 304 | 304 | 'product_source' => 'local', |
| 305 | 305 | 'mailbox_id' => Arr::get($data, 'list_id'), |
| 306 | - 'title' => sanitize_text_field(wp_unslash(Arr::get($data, 'ticket_title'))), | |
| 307 | - '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')), | |
| 308 | 309 | 'attachments' => sanitize_text_field(Arr::get($data, 'ticket_attachments')), |
| 309 | 310 | 'client_priority' => strtolower(sanitize_text_field(Arr::get($data, 'client_priority', ''))), |
| 310 | 311 | 'priority' => strtolower(sanitize_text_field(Arr::get($data, 'client_priority', ''))), |
| 311 | 312 | 'custom_fields' => $ticketCustomField, |
| @@ -480,12 +481,12 @@ | ||
| 480 | 481 | private function isBlockedCustomer($customerEmail) |
| 481 | 482 | { |
| 482 | 483 | $customer = Customer::where('email', $customerEmail)->first(); |
| 483 | 484 | |
| 484 | - if('inactive' == $customer->status || !$customer->status) { | |
| 485 | - return true; | |
| 485 | + if (!$customer) { | |
| 486 | + return false; | |
| 486 | 487 | } |
| 487 | 488 | |
| 488 | - return false; | |
| 489 | + return $customer->isBlocked(); | |
| 489 | 490 | } |
| 490 | 491 | |
| 491 | 492 | } |