I am struggling to implement a php code with the following structure:
public function hookActionValidateOrder($params)
{
$invoice = new Address((int)$order->id_address_invoice);
$myStreet = $invoice->address1;
$myCity = $invoice->city;
$myPostcode = $invoice->postcode;
// ... SOME IRRELEVANT CODE HERE ...
$Tid = send($myStreet, $myCity, $myPostcode); /* Calling function send($a, $b, $c) */
}
public function send($a, $b, $c) /* function send($a, $b, $c) */
{
// ... CODE TO DO SOMETHING USING VARIABLES $a, $b, $c ...
}
The problem is, this code doesn´t seem to work. When I put it into a code validator, it says: "Function 'send()' does not exists". Why is that so and how do I fix that?