Jump to content

ClientDetailsValidation hook not working (exactly) as documented

Recommended Posts

The ClientDetailsValidation hook is being called on client account creation and update, but it is also being called when an existing client is making a credit card payment on an outstanding invoice. This causes the payment to fail as the client already exists.


We can work around this by checking for an invoiceid variable in the $vars array, but I am wondering in how many other cases it may be called.


If this is expected behavior, it would be nice to have a variable that tells us the context of the call (and also have it reflected in the docs).

Link to comment
Share on other sites

if you want to know the scope, you can output $vars and see what is contained in the array. there are normally at least two but this isn't always the case. I do understand your point on the documentation it can be a little sparse in its information in places but that's not necessarily a bad thing, it means you have to investigate and learn and not just rely on somebody else's work.

Edited by CDJ Hosting
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.

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