andre il y a 3 ans
Parent
commit
08b8d38e78
1 fichiers modifiés avec 2 ajouts et 4 suppressions
  1. 2 4
      api/cwp7/Admin.php

+ 2 - 4
api/cwp7/Admin.php

@@ -323,10 +323,8 @@ class cwp7_Admin {
         curl_setopt($ch, CURLOPT_URL, $this->cwp7URL . 'v1/' . $endpoint);
         curl_setopt($ch, CURLOPT_URL, $this->cwp7URL . 'v1/' . $endpoint);
         curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
         curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
         curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
         curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
-        if(!$this->cwp7Secure) {
-            curl_setopt($cwp7Client, CURLOPT_SSL_VERIFYPEER, false);
-            curl_setopt($cwp7Client, CURLOPT_SSL_VERIFYHOST, false);
-        }
+        curl_setopt($cwp7Client, CURLOPT_SSL_VERIFYPEER, false);
+        curl_setopt($cwp7Client, CURLOPT_SSL_VERIFYHOST, false);
         curl_setopt ($ch, CURLOPT_POSTFIELDS, http_build_query($data));
         curl_setopt ($ch, CURLOPT_POSTFIELDS, http_build_query($data));
         curl_setopt ($ch, CURLOPT_POST, 1);
         curl_setopt ($ch, CURLOPT_POST, 1);
         $response = curl_exec($ch);
         $response = curl_exec($ch);