← All changes
|
app/Services/Integrations/NotificationIntegrationBase.php
+5
-5
1.4.5
→
2.4.0
View file →
| @@ -2,8 +2,9 @@ | ||
| 2 | 2 | |
| 3 | 3 | namespace FluentSupport\App\Services\Integrations; |
| 4 | 4 | |
| 5 | 5 | use FluentSupport\App\Models\Meta; |
| 6 | +use FluentSupport\App\Services\Helper; | |
| 6 | 7 | |
| 7 | 8 | abstract class NotificationIntegrationBase |
| 8 | 9 | { |
| 9 | 10 | abstract public function getSettings($withFields = false); |
| @@ -46,9 +47,9 @@ | ||
| 46 | 47 | ->where('key', $this->key) |
| 47 | 48 | ->first(); |
| 48 | 49 | |
| 49 | 50 | if ($exist) { |
| 50 | - return maybe_unserialize($exist->value); | |
| 51 | + return Helper::safeUnserialize($exist->value); | |
| 51 | 52 | } |
| 52 | 53 | |
| 53 | 54 | return false; |
| 54 | 55 | } |
| @@ -55,12 +56,11 @@ | ||
| 55 | 56 | |
| 56 | 57 | public function sendRequest($url, $params = [], $method = 'GET', $extraHeaders = []) |
| 57 | 58 | { |
| 58 | 59 | $request = wp_remote_request($url, [ |
| 59 | - 'sslverify' => false, | |
| 60 | - 'method' => $method, | |
| 61 | - 'body' => $params, | |
| 62 | - 'headers' => $extraHeaders | |
| 60 | + 'method' => $method, | |
| 61 | + 'body' => $params, | |
| 62 | + 'headers' => $extraHeaders | |
| 63 | 63 | ]); |
| 64 | 64 | |
| 65 | 65 | if (is_wp_error($request)) { |
| 66 | 66 | return new \WP_Error($request->get_error_code(), $request->get_error_message()); |