Jump to content

Help with WHMCS Hook to Target Specific Clients with Draft Mode Invoices and Manual Edits


Recommended Posts

Hello WHMCS community,

I’m running a telecom business and using WHMCS for client billing. I face a unique challenge where I need to automatically generate invoices each month with variable phone charges for my clients, and I want to ensure these invoices remain in draft mode so that I can manually edit them before sending.

Here’s my planned workflow:

  1. WHMCS generates invoices automatically via the cron job, which it already does.

  2. Invoices are immediately set to draft mode for specific clients only.

    • To do this, I plan to specify a comma-separated list of client IDs within the hook. Only these clients will be affected by the hook.

  3. I manually edit the invoices by adding custom charges as necessary.

  4. Once edited, I manually publish the invoice and use the “Send Invoice” button to send the invoice to the client.

However, I’ve encountered a problem: even after I manually publish the invoices, I can’t send them because of the interference from the hook.

I’m looking for a solution where I can:

  • Target specific clients by including their user IDs in the hook.

  • Keep the invoices in draft mode for these clients.

  • Allow manual editing and publishing of the invoices so I can send them without issues.

Has anyone experienced this or can suggest how to modify the hook to allow manual sending after invoice publication? Any help or advice would be greatly appreciated!

Thanks in advance!

Best regards,

Rizvi

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