Jump to content

How to perform test WHMCS Hook with some trigger URL?


Recommended Posts

Hi,

How can I test the whmcs hook 'invoicepaid' without paying the invoice each time to test the output of the $vars and function ?

Quote

<?php
add_hook('InvoicePaid', 1, function($vars) {
    // Perform hook code here...
});

Could it be something like that can trigger the invoicepaid hook ? e.g. ?id=43&hook=invoicepaid?

Link to comment
Share on other sites

3 hours ago, Magicklug said:

How can I test the whmcs hook 'invoicepaid' without paying the invoice each time to test the output of the $vars and function ?

get yourself a free dev license (if you get your license direct from WHMCS) and then you won't have to worry about creating and paying dummy invoices.

https://www.whmcs.com/members/knowledgebase.php?action=displayarticle&id=78

3 hours ago, Magicklug said:

Could it be something like that can trigger the invoicepaid hook ? e.g. ?id=43&hook=invoicepaid?

that wouldn't work.

if you can't get a dev install, then you could work on the function in another hook, even if it's clientareapage and you can trigger the function to run only if certain conditions are met.

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