Jump to content

Hook: InvoiceCreated mislabeled


twhiting9275

Recommended Posts

V 6.2 (yeah, yeah I know, not my install, or my choice :))

 

So, looking through the invoice creation hook, this is misleading and needs to be corrected here

 

Variables:

user string int

 

One would expect that this returns the actual invoice user.

Instead, what this returns is the admin user

 

I spent a few hours trying to figure out why this value was always returning incorrect (rather the same) values before checking the output itself. Lo and behold, the API admin userid is returned, instead of the userid.

 

If this is how it should be, great, wonderful, then document it as such. If not, well, that needs to be changed too ;)

Link to comment
Share on other sites

Hi Tom,

 

I think the old documentation (which btw should remain available as long as possible!) is correct for v6.2 -

 

http://docs.whmcs.com/Hooks:InvoiceCreated

 

user- integer - The Admin ID. If auto generated, this will show "system".

now whether the hook has changed in v7, or the updated documentation is just wrong, I can't say - but WHMCS should really take more care with their documentation - we all have better things to do than waste time trying to second-guess whether the documentation or our own code is wrong! :roll:

Link to comment
Share on other sites

Problem is there's no index for these on the old system. it simply says 'see the new system', which is clearly not done yet, or ready for public consumption

So, this is yet another reason that documentation needs to be moved back where it is properly.

We really shouldn't have to go through dozens of different steps because someone can't document , or verify documentation is written properly.

Link to comment
Share on other sites

the above link was working yesterday, now I see it's been cleared... though still available in a cached version at Google... the cached version of the old index page is now gone. :roll:

 

there is a complete version of the old documentation @ archive.org - i've just made a copy of it, so if/when that goes, at least i'll still have the files locally... ridiculous we should have to do this, but there we go - nothing surprises me about WHMCS anymore.

Link to comment
Share on other sites

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