amuck-landowner

Some free WHMCS Hooks you might find useful.

KuJoe

Well-Known Member
Verified Provider
Figured I'd post these here since some of these are pretty helpful.

invoiceAddCredit - WHMCS hook to automatically add a percentage of credits based on payment processor. (Inspired by )

chkClientDetails - A WHMCS hook that checks new client details for blocked words and displays an error if such words exist in any of the client fields. (Inspired by this thread.)

Extended-Login-Tracker - A WHMCS addon that records all IPs that login and makes them searchable (adapted from 2 different scripts). (Inspired by )

IP_to_Domain - A simple WHMCS hook that replaces a services domain to the dedicated IP assigned to it during service creation (great for VPS services when you want to search for who has had a specific IP in the past and for identifying services since domains in WHMCS don't update for most VPS control panels when hostnames change). (Holy smokes an original!)

closeFraud - A simple WHMCS hook to automatically close accounts who are marked Inactive and only have fraudulent orders. If an account has order marked as Fraud but also has an order not marked as fraud, the account is skipped. Runs after WHMCS's daily cron. (Holy smokes an original!)

chkProxy - A simple WHMCS hook that checks if the client is using a proxy/VPN prior to ordering (saves tickets and time). (Holy smokes an original!)

As you can see I get some original ideas sometimes but I'm always looking for inspiration so if you have any ideas or requests feel free to post them here and I'll see what I can do. :)
 

mitgib

New Member
Verified Provider
@KuJoe I was searching for this post when I had the idea you have made a hook that issued credit on cancel and went and looked through https://github.com/KuJoe but I was mistaken.  Can I inspire you yet again?  I was thinking, along the same lines at BuyVM, when a customer cancels service and choses immediate, any remaining time is credited as account credit. When they chose end of billing period, obviously there is no credit due.


I had thought this was built in since downgrades do the same thing, but I either missed it in the settings or I am looking for something @Aldryic C'boas hooked for BuyVM
 
Last edited by a moderator:

KuJoe

Well-Known Member
Verified Provider
@KuJoe I was searching for this post when I had the idea you have made a hook that issued credit on cancel and went and looked through https://github.com/KuJoe but I was mistaken.  Can I inspire you yet again?  I was thinking, along the same lines at BuyVM, when a customer cancels service and choses immediate, any remaining time is credited as account credit. When they chose end of billing period, obviously there is no credit due.


I had thought this was built in since downgrades do the same thing, but I either missed it in the settings or I am looking for something @Aldryic C'boas hooked for BuyVM

I pushed this to my GitHub but I haven't had time to test it. If somebody else has a development WHMCS they want to try it out in it would be appreciated because my dev setup is in use at the moment for other testing and I don't want to test multiple modules/hooks/addons at once.


https://github.com/KuJoe/cancelledCredit
 
Last edited by a moderator:

mitgib

New Member
Verified Provider
I pushed this to my GitHub but I haven't had time to test it. If somebody else has a development WHMCS they want to try it out in it would be appreciated because my dev setup is in use at the moment for other testing and I don't want to test multiple modules/hooks/addons at once.


https://github.com/KuJoe/cancelledCredit

I tried this out since I had 1 immediate cancel this morning, changed the $admin user to a valid admin, no credit posted. Sorry I am unable to provide any other details, looking at the detailed cron report has nothing to add. Will wait until you are able to try your test environment.
 

qps

Active Member
Verified Provider
chkProxy - A simple WHMCS hook that checks if the client is using a proxy/VPN prior to ordering (saves tickets and time). (Holy smokes an original!)



We've been using this for a while and it has been working great, but I think recently MaxMind may have changed the way that they process queries, because now I am seeing a score of 0.00 being returned with an error, which gives an error in the script and prevents users from ordering.  Anyone else seeing this?
 
Last edited by a moderator:

KuJoe

Well-Known Member
Verified Provider
We've been using this for a while and it has been working great, but I think recently MaxMind may have changed the way that they process queries, because now I am seeing a score of 0.00 being returned with an error, which gives an error in the script and prevents users from ordering.  Anyone else seeing this?

What error are you seeing? I'll review their API and see if they changed anything.
 

qps

Active Member
Verified Provider
What error are you seeing? I'll review their API and see if they changed anything.

It says "city not found" when I click through to review the query.  I'm not sure if that what is causing the issue or not.
 

KuJoe

Well-Known Member
Verified Provider
That's really strange, it shouldn't be checking the city since it's just their proxy check. Are you sure you have the Proxy Detection credits and not just the minFraud credits?
 

qps

Active Member
Verified Provider
That's really strange, it shouldn't be checking the city since it's just their proxy check. Are you sure you have the Proxy Detection credits and not just the minFraud credits?

Yes, these are the same proxy check credits I've been using all along.  They only recently started throwing this error.
 

UltratechHost

New Member
Verified Provider
Hi,


From the source code or date of update for InvoiceAddCredit it looks like is from WHMCS 5 not for WHMCS 6.X


So can you please confirm whether they works with WHMCS 6.X
 

KuJoe

Well-Known Member
Verified Provider
Hi,


From the source code or date of update for InvoiceAddCredit it looks like is from WHMCS 5 not for WHMCS 6.X


So can you please confirm whether they works with WHMCS 6.X

It will work with WHMCS 6.x until they disable the SQL Helpers.
 

kunnu

Active Member
Verified Provider
Login IP tracker and Proxy IP checker is really very useful however using hooks is really harmful because of I was use "chkClientDetails" type script for avoiding spam tickets but even ticket of some customers was blocked so I stop using this hooks.
 

KuJoe

Well-Known Member
Verified Provider
Login IP tracker and Proxy IP checker is really very useful however using hooks is really harmful because of I was use "chkClientDetails" type script for avoiding spam tickets but even ticket of some customers was blocked so I stop using this hooks.

It shouldn't have anything to do with tickets unless WHMCS forgot to update their documentation for the ClientDetailsValidation hook:

This is run when before adding a client or updating a client through the Admin or Client area.
 

WSH_DNYT

New Member
Verified Provider
thank you for sharing.


The Discount on payment gateway used is interesting as you could reward ppl paying with bitcoin (less cost on our side)
 
Top
amuck-landowner