Cancel invoice for terminated and cancelled services

This hook runs after all the automations and set the invoices to “Cancelled” it the services have been terminated or cancelled. This feature has been long requested to WHMCS but it was never implemented.

All you need to do to install and activate the hook is to upload the file into the /includes/hooks of you WHMCS installation. It will day after the cron runs it will set all the invoices to “Cancelled” if the related product is Terminated or Cancelled.

It will also create an entry in the client log to have a record or the cancelled invoice. The same log will appear also in the System Activity Log.

It’s as easy as that.

whmcstricks cancel invoice for terminated services

Do not send Upcoming Domain Renewal Notice for “do not renew” domains

WHMCS has what we think it’s a bug.

If one of your clients decides to not renew a domain you can see it in the domain page, having this checked:

Do not send Upcoming Domain Renewal Notice for do not renew domains

Even if the client expressed he doesn’t want to renew the domain, WHMCS will still send the reminder email, which we think isn’t useful.

We created this free hook to avoid sending emails if the domain has been disabled for auto renew.

Simply download it and upload in includes/hooks folder of your whmcs installation. You don’t have to do anything else.

When The hook stops an email from being sent it creates a log in the user log (and the activity log as well) with this text:

Hook whmcstricks_do_not_send_reminder_email_for_cancelled_domains prevented email to be sent for domain

This way you can make a search and check when it took effect.

Related product required when opening a ticket

WHMCS by default lets your customers pick a service, addon or domain when opening a ticket.

For some departments it could be useful to force this, setting the Related Service select required.

This is exactly what this hook does.

Installation and configuration

To install the hook simply upload the php file in the includes/hooks folder of your whmcs installation.

This hook requires the Custom module to manage hooks settings that you can download for free.

All you will have to do is to add a setting (whmcstricks_related_product_required_departments) with the departments names as the setting values.

The department names have to be comma separated (example: info, support) with or without the space. Make sure you’re using exactly the same name you’re using in whmcs, with a particular look on capital letters, since the script is case sensitive.

NOTE: if you’re using Dynamic Field Translations please make sure you add all the translations for the department to the setting, to make it work in every language.

Correct the scroll

If you’re using a fixed menu on top, the page will scroll, but most likely the field will remain below the menu. If this is the case with your theme you can set the setting “whmcstricks_related_product_required_full_scroll” to “true” (without the quotation marks). With this setting the page will scroll all the way to the top.

Check for manual activation

Sometimes you need to activate a product or service after it has been ordered by the client. For example you might have a VPS or a license that you’re managing manually.

This hook will create a ToDo in the ToDo list for every product, addon and configurable option that has been ordered. The hook gets created after the order has been paid, this way when you see the ToDo you can activate the product for the client.

One of our clients for example is reselling VPS that he orders manually, and the cPanel license as a configurable option, thus we create this hook to make its life easier. This way the hook will create a ToDo when he has to activate a service, reducing the checking and possible errors.

Read more

Ask for ticket feedback

We believe that the feedback request after a ticket is closed could be improved in whmcs. We decided to create a custom jotform form, where to redirect our users.

We ask them to rate their experience, if they give us 4 or 5 stars then we’ll send them to a review website to leave a review. If they give us 3 stars or less we’ll ask them what was wrong, one of our admin will review the answer and try to solve the issue they had in a way that the same problem will not happen again.

Read more

Ask for customer reviews on ticket

One of the most important things in a business are reviews. It’s very important to remind your operators to ask for reviews whenever they are helping clients. This is simply the best moment to ask for a review.

This hook adds a box for every review website you’re on just below the ticket box. This way your support operator can copy the text and paste it in the ticket box. Of course he will do that if he thinks the client is happy with the support.

The order of the boxes is randomised, this means that the support operator should always copy the text from the first box, but he has the freedom to choose another one.

This way you can keep asking your clients for reviews, and you can ask them in the best moment ever, when they are happy with your support, hoping they will give you a good review.

Read more

Check for manual renewal

Sometimes you need to renew a product or service once it has been renewed by the client. For example you might have a VPS or a license that you’re managing manually.

With this hook you can check if when an invoice gets paid includes a package, addon or configurable options that has to be renewed manually.

One of our clients for example is reselling VPS that he orders manually, and the cPanel license as a configurable option, thus we create this hook to make its life easier. This way the hook will create a ToDo when he has to renew a service, reducing the checking and possible errors.

This hook requires WHMCS API CreateToDo to work properly and our free Custom module to manage hooks settings. Read more

Check the gateway log for IPN Handshake Invalid

From time to time we get a PayPal problem. The payment is received, but there is a problem with the transaction with the error “IPN Handshake Invalid”.

Obviously checking the LOG manually everyday is not an option, so we created this hook to do the hard work for us.

Other errors are possible, but the hooks is not ready for them yet. Do you have suggestions for different kind of errors and payment gateways? Contact us or comment this post, we’ll be happy to improve it and make it more configurable!

We created an hook that every hour checks your gateway LOG, and creates a ToDo if there has been an error. Read more

Custom Hook – Change the logo for the online invoice

With a client we had a problem. His theme has a dark header, so his logo was white. He added the logo url in the WHMCS configuration.

whmcs hooks change logo url for invoice

The problem then is that the online invoice has a light background, and the logo was barely visible. Read more

Custom Hook survey EPP request

This hook allows you to ask a question to your clients right before they get the EPP code using a jotform.com form.

Once they fill the question they will be redirected to the client area where the EPP code is shown.

Read more