hi,
I need to integrate whmcs with a 3rd party webservice.
So, when the user registers in whmcs, i need to register him into the webservice,
and when the user completes an order, i need to register that too in the webservice.
In the first case, i created a hook, meant to run after client registration.
And for the second case, I developed a module.
The problem is: I need to share some files between the hook and the module. I've tried to have one copy of each such file, one in the hooks directory, and other in the modules/servers directories, but it seems that by doing so whmcs includes each file twice(although i use require_once) and I got an error saying i'm redefining some functions.
A possible solution would be mantain just one copy of each file, let us say in the modules/servers dir, and then in the hook include the file from there. but that's not working too, i got a error saying that the file could not be included.
anyone can tell how the best way to do it?