Jump to content

WHMCS hooks, php-classes and scope of variables


mmkapper

Recommended Posts

Hi,

probably its a php scope problem of a kind, i haven't encountered yet.

so help needed.

 

i reduces my files to the absolute minimum.

create_customer.php ... is the whmcs hook file for "ClientAdd".

WaWiApi.php ... contains the class wawi (in this test only the constructor)

wawidefintions.php .. contains settings for this Api

 

when calling from command line, with WHMCS stuff in comments and the function called seperately it works

 

php5 create_customer.php

in construct - mydatabases

string(4) "test"

 

in log_client_add - mydatabases

string(4) "test"

 

when undoing the commments for WHMCS Stuff and commenting out my function call, the hook is active.

creating a user in whmcs let the hook being called but $mydatabases does not get any information the output is:

 

in construct - mydatabases

NULL

 

in log_client_add - mydatabases

NULL

 

end log client

 

any ideas?

 

 

thx

 

Michael

create_customer.php.txt

WaWiApi.php.txt

wawidefinitions.php.txt

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated