title: Is it possible execute a function in Prestashop via hooks without creating a module?
body: <p>I have created this test function (lets call it <code>ABtest.php</code>) to send a test message:</p>
  
  <pre><code>$host = "http://localhost:8080";
  $id = "123";
  $email = "mine.mail@gmail.com";
  
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_USERPWD, "mine.mail:mypassword");
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
  curl_setopt($ch, CURLOPT_HTTPAUTH, TRUE);
  
  function send($host,$id,$email,$ch){
      curl_setopt($ch, CURLOPT_URL, $host . "/c/" . $id . "/your ID/");
      curl_setopt($ch, CURLOPT_POSTFIELDS, "to=" . $email . "&amp;subject=Your ID ");
      curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
  
      $output = curl_exec($ch);
  
      if (curl_getinfo($ch, CURLINFO_HTTP_CODE) != 200 &amp;&amp; curl_getinfo($ch, CURLINFO_HTTP_CODE) != 201) {
          printf("An error occured (HTTP %d): %sn", curl_getinfo($ch, CURLINFO_HTTP_CODE), $output);
      } else {
          printf("Success");
      }
  }
  </code></pre>
  
  <p>I would like to place this code into my hook <code>hookValidateOrder($params)</code> like this:</p>
  
  <pre><code>public function hookValidateOrder($params)
  {
      $id = $params['cart']-&gt;id;
      $host = "http://localhost:8080";
      $email = "mine.mail@gmail.com";
  
      // + the rest of my PHP function - see the 1st code block above    
  }
  </code></pre>
  
  <p>The problem is that I don´t really know where to place my code. As You can see I am not creating a module, I just want to execute my PHP function via <code>hookValidateOrder($params)</code> hook. </p>
  
  <p>Is that possible and where do I place it?</p>