Free Action Hooks • Modules • Reports for WHMCS

Free Action Hooks • Modules • Reports for WHMCS

Back   Posted on 27 april 2020 / Updated on 7 october 2020
Reading time 25 minutes

WHMCS as Fast as Possible

It's much easier to understand what is WHMCS making a parallelism with WordPress. Of the many free CMS, WordPress is the best and most popular solution to start a blog. WHMCS is the same in its reference market. It's the way go to start an hosting business for providers, web agencies and IT professionals.

Both systems are the undisputed market leaders in their respective field. WordPress reaches 60% of market share. WHMCS attracts about 50.000 customers worldwide. They are both flexible and can accommodate several businesses needs. In them there's more than a control panel and a blogging platform.

That said, similarities end here. WordPress is free, open source and good at many things. WHMCS kicks off at 15.95 $ per month. Source code is obfuscated and even if it is a solid platform, WHMCS is not perfect.

Continue reading our beginners guide to WHMCS and common mistakes to avoid in WHMCS for more details.

Understanding Action Hooks

Action Hooks allow you to execute your own code when events occurr inside WHMCS. With them you can achieve impressive results.

For example we managed to transform WHMCS into a CMS like WordPress with full support for Search Engine Optimization. We've also introduced new billing concepts (monthly invoicing, electronic invoicing, credit notes) and Affiliate Marketing.

As you can see you can there's no limit to imagination. If you're new to WHMCS and Action Hooks, please refer to documentation:

Perfect Your WHMCS

Over the years we coded thousand of action hooks most of which are part of our WHMCS modules.

In this post that is available also on Github we share a collection of action hooks for free that you can copy/paste on your WHMCS site. You can also adapt them to your specific needs or use as inspiration for your projects.

The point of this this project is to help Developers, Hosting Providers, Web Agencies and IT professionals to perfect WHMCS. We are continually adding and improving hooks. It would be great if could you join us on Github!

Free Hooks Collection

This post contains in-depth instructions and previews. It is also available in italian language. We are always willing to code new hooks based on your feedback so feel free to comment and ask for new ones.

Scripts are provided free of charge "as is" without warranty of any kind. You're not allowed to remove copyright notice. Let's start!

Admin Stats for WHMCS v8

As you probably know WHMCS v8 no longer provides statistics on top of the page about pending orders, overdue invoices and tickets awaiting reply. This action hook adds them back to interface as you can see from the following screenshots.

This badge is fully responsive and appears if there's at least one pending order, overdue invoice or ticket awaiting reply. If there's nothing to show it disappears. To avoid any possibility of confusion, the hook automatically detects if you're running v8.

Get the Code

Simulate / Run WHMCS Daily Cron Job on Demand

As the name suggests, WHMCS daily cron job runs once per day. There's no easy way to make it run multiple times. This could be frustrating in case you're coding or testing new features that's where this hook comes to help.

The hook adds Run Daily Cronjob button (the orange one) on top of your WHMCS Administration. Clicking it allows to run WHMCS daily cron job whenever you want. All it takes is a click. Please, ignore Reinstall and Manage Demo buttons. We use them for Live Demo to let visitors try our modules before purchase.

Get the Code

Accept Quote without Logging In

When you send a quote, WHMCS forces customers to login in order to accept it. This hook allows them to accept without the need to login. Every time the Quote Delivery with PDF mail is sent, the hook overrides {$quote_link} with a new link that contains an hash that ensures the authenticity of the request. This way only the recipient can accept the quote.

When the visitor clicks the link, the quote is automatically accepted and he/she sees the following modal on screen.

Get the Code

Bulk Auto Recalculate Client Domain & Products/Services

Yes, WHMCS integrates Bulk Pricing Updater but it works for all existing customers. Sometimes you simply need to recalculate prices for domains and products/services of a specific customer. This hook allows to do that in one click. First it adds the following button in client Summary.

Second it shows this modal on screen where you can freely choose to auto-recalculate domains or products/services.

Get the Code

cPanel & Plesk login button in My Services

Managing multiple hosting accounts could be frustrating for customers. The following hook makes things easier allowing them to login to any control panel directly from My Services list. Here's the preview.

The hook works with any panel (cPanel, Plesk, DirectAdmin, Centova Cast...) provided that servers and products/services have been integrated correctly. Before you get the code, keep in mind that this action hook requires some changes to a template file.

Open templates/{YOUR_TEMPLATE}/clientareaproducts.tpl and add the new Manage column in thead like follows.

<thead>
    <tr>
        <th>{$LANG.orderproduct}</th>
        <th>{$LANG.clientareaaddonpricing}</th>
        <th>{$LANG.clientareahostingnextduedate}</th>
        <th>{$LANG.clientareastatus}</th>
        <th>{$LANG.manage}</th>
        <th class="responsive-edit-button" style="display: none;"></th>
    </tr>
</thead>

Your thead could be slightly different (eg. your first column could be the SSL icon check) so change things accordingly. Next move to tbody and add the cell right inside {foreach} loop.

<td class="text-center">
	{if $kt_autologin[$service.id]}
	<div class="btn-group btn-group-sm plesk-login" style="width:60px;">
		<a href="clientarea.php?action=productdetails&id={$service.id}&autologin=1" target="_blank" class="btn btn-primary btn-xs" alt="Click to Login" title="Click to Login" style="padding: 2px 5px;"><img src="templates/{$template}/img/katamaze_autologin/{$kt_autologin[$service.id]->type}.png" style="height:22px; max-width:39px"> <i class="fa fa-sign-in fa-fw" aria-hidden="true"></i></a>
	</div>
	{/if}
</td>

We suggest you to replace Click to Login with $LANG variable for multi-language support. Now we need to disable sorting for the newly added column. On top of the file you'll find the following statement.

{include file="$template/includes/tablelist.tpl" tableName="ServicesList" noSortColumns="4" filterColumn="3"}

Focus on noSortColumns="4". 4 means that the 5th column will be not sortable (column count start from zero). Change it accordingly. For example if your template uses the SSL check as 1st column, use noSortColumns="0, 5".

Get the Code

Related Service in Ticket Sidebar

Customers can specify the related service/domain on ticket submission but once the ticket has been sent the information is no longer visible. This hook makes sure that related service is always included in ticket sidebar (if specified).

Get the Code

Force Payment Gateway depending on Invoice Balance

It doesn't matter what payment method you use. It can be PayPal, Stripe, Skrill or Credit Card. The typical gateway charges absurdly high fees to manage your money. Billing Extension helps you saving up to 18% on transaction fees but such costs can be lowered even further.

Let's face it. In an ideal world we would be receiving money just with Bank Transfer (aka Wire Transfer) since it doesn't cost you anything. The following hook can be used to force the most convenient gateway you have depending on invoice balance. For example if invoice balance >= 1000 euro force banktransfer. Let's do some math.

  • PayPal charges 3.4% + 0.35 € per transaction meaning that receiving 1000 € costs you 35.35 €
  • Let's suppose on a yearly basis you receive 10 payments of 1000 €
  • At the end of the year you gave to PayPal 353.5 €

With this hook you can keep this money for you. As if it wasn't enough, the hook can be customized to force the payment gateway depending on customers' country. For example you can use the hook just for specific countries (eg. IT, FR, DE) and/or European Union. Don't worry about multiple currencies. The script automatically handles currency conversion when needed.

Get the Code

Auto-Terminate Free Trials After X Minutes

Free trials for a limited period is a good marketing strategy to capitalize on the leads you get. The problem with trials is that the smallest unit of time for WHMCS is the day meaning that for example you can't provide a trial for VPS that last for a couple of hours. WHMCS can't "think" for a period of less than a full day.

The following action hook allows to automatically terminate the given products/services after a certain number of minutes. It runs AfterCronJob hook point that normally triggers once every 5 minutes. Visit Setup > Automation Settings and make sure that cron.php runs every 5 minutes as suggested by WHMCS. The hook will do the rest. It also logs terminations in Activity Log.

Get the Code

Stronger Password Generator for Auto-Provisioning

We give you not one, not two but three action hooks to override default passwords generated by WHMCS for service provisioning on third-party control panels like Plesk, cPanel, DirectAdmin and custom-made server modules.

  • v1 randomly picks 10 characters from a-zA-Z0-9 and [email protected]#$%^&*()-=+?
  • v2 same as above but makes sure that at least one special character is included in the password
  • v3 for extremely strong passwords. Individually define the number of digits, lowercase, uppercase and special characters to use. The resulting password will not use the same character twice

One-off Products/Services & Domain purchase requires Product/Service

If you have a bit of experience with WHMCS, you know that offering promotions just via coupon codes isn't so flexible.

Many prefer to have products/services created specifically for special deals. Similarly others want to restrict domain purchase to customers with at least a product/service in their accounts. The hook lets you achieve both goals. Simply configure the following variables:

  • $onetimeProducts array of product IDs to treat as "one-off" (customer is not allowed to order the same product multiple times)
  • $onetimeProductGroups same as above but for product group IDs. Producs inside such groups are treated as one-off
  • $firstTimerTollerance product-based restrictions are disabled for new customers placing their first order with you
  • $notRepeatable if a customer already has a one-off product, he can't purchase further one-offs ($firstTimerTollerance is ignored)
  • $domainRequiresProduct domain purchase is allowed only if any of the following conditions is met:
    • Customer has an existing product/service (Pending and Terminated don't count)
    • Customer is purchasing a domain and a product/service
  • $promptRemoval notify customer about restrictions via (previews are below):
    • bootstrap-alert right below Review & Checkout
    • modal on screen
    • js-alert on scren
  • $textDisallowed message displayed for product-based restriction
  • $textRequireProduct message displayed for domain-based resrticion

When the hook detects that the customer is not allowed to order specific products/services and/or domains, it removes them from WHMCS cart showing alerts.

Get the Code

New Clients as Affiliates

Automatically sets newly registered customers as Affiliates on WHMCS. This way they don't need to join manually.

That said, as you probably already know the affiliate system of WHMCS is very basic. If you need something more complete and sophisticated take a look at Commission Manager.

Get the Code

Send Email & Add Reply on Ticket Status Change

When the status of a support ticket changes, WHMCS doesn't send any notification. We can tweak this process by sending an email and optionally also automatically add a reply to the ticket itself. This way you can guide customers through the resolving process letting them track the progress of tickets.

Get the Code

Ticket Feedback on Auto Close via Escalation Rule

Sending feedback request on ticket closure is a great way to measure customer support satifaction however this feature has a missing piece. A ticket in WHMCS can be set as Closed in three different ways:

  • When the ticket is closed by an admin user
  • For inactivity Setup > Automation Settings > Support Ticket Settings > Close Inactive Tickets
  • Via escalation rules

WHMCS doesn't send any feedback request when the ticket is closed with an escalation rule. The hook in question solves this problem. The only requirements are the following:

  • $cronFrequency must be equal to your System Cron Frequency
  • You must use unique names for escalation rules

Get the Code

Disable Feedback for Unanswered Tickets

WHMCS always sends feedback requests for closed tickets, no matter what. This includes the case of customers closing tickets before you even had the chance to add a reply. For example a customer opens a ticket to report an error on his website. Few minutes later he realizes that it was his fault and closes the ticket. WHMCS still sends feedback request.

This is quite strange as you are asking customers to let you know the «Quality of experience» with your support team. No one has even answered! Some customers could even give you a very bad rating because they feel you're tricking them. Let's patch the hole with this hook.

Get the Code

Client to Group based on Purchased Items

Automatically assign customers to a client group based on purchased product/service, product addon and configurable options. It works only for customers that haven't been assigned to any group yet. Below we're going to show you how to define group/product pairs. Let's take this configuration as example.

$groups['products']['1'] = array('1', '2', '3');
$groups['products']['2'] = array('4');
$groups['productaddons']['1'] = array('2');
$groups['configurableoption']['3'] = array('5' => true, '6' => array('7', '8', '10')); 

They key of the first level of $groups array (eg. ['products']) can assume the following values:

  • products for group/product pairs
  • productaddons for group/product addon pairs
  • configurableoption for group/configurable option paris

The key of the second level of $groups array (['1'], ['2']) represents the client group ID. array() stores product IDs, product addon IDs and configurable options. Let's put it into practice explaining what the above configuration means:

  • Customer A purchases product 1. He goes to client group ID 1
  • Customer B purchases product 2. He still goes to client group ID 1
  • Customer C purchases product 4. He goes to client group ID 2
  • Customer D purchases product 5. No action taken
  • Customer E purchases product 1 and is already assigned to a client group. No action taken
  • Customer F purchases product addon 2. He goes to client group ID 1
  • Customer G purchases a product selecting any value of configurable option ID 5. He goes to client group ID 3
  • Customer H purchases a product selecting specifically 7, 8 or 10 options of configurable option ID 6. He goes to client group ID 3

The script is available in two versions. The configuration is the same. What changes is the hook point:

  • AcceptOrder version assigns the group when the order is accepted - both manually and automatically
  • EmailPreSend version assign the group a moment before WHMCS sends the Welcome Email - any type (eg. Hosting, VPS, CodeGuard, Marketgoo...). This way the group just assigned is immediately ready for use in email templates

Client to Group based on Registration Date

This hook is similar to the one that assigns clients to groups based on purchases. This time we're assigning clients to groups based on registration date or more precisely on user seniority. Let's take this code as example.

$groups['1'] = '90';
$groups['2'] = '180';
$groups['3'] = '365';

The key of $groups array (eg. ['1']) represents the ID of the group while the value user seniority (days between registration date and current date). According to the above configuration, here is what happens:

  • Customer A registered 34 days ago. No change
  • Customer B registered 90 days ago. He goes to client group ID 2
  • Customer C registered 364 days ago. Still group ID 2
  • Customer D registered 500 days ago. He goes to client group ID 3

The hook runs with WHMCS daily cron job meaning that tomorrow the customer C of the above example will move from group 2 to 3. Optionally, you can turn on any of the following features to add some restrictions:

  • $activeCustomers rules apply only on Active customers (boolean true or false)
  • $oldestPurchase rules apply only on if customer has a product/service or domain older than the given number of days (integear)

Get the Code

Client to Group based on Registered Domains

The hook assigns clients to groups based on the number of active domains in their accounts (Active, Grace and Redemption). This is particularly useful for Domain Pricing slabs. Let's take this code as example.

$groups['1'] = '10';
$groups['2'] = '25';
$groups['3'] = '100';

The key of $groups array (eg. ['1']) represents the ID of the group while the value the number of active domains. According to the above configuration, here is what happens:

  • Customer A has 10 domains. He goes to client group ID 2. Next day domains become 9. The the customer is removed from the group
  • Customer B has 99 domains. He still goes to client group ID 2 but will be moved to 3 in case he manages to reach 100 domains
  • Customer C has 250 domains. Group ID 3

The hook runs with WHMCS daily cron job meaning that customers are moved (or removed) from groups on a daily basis. Optionally, you can use the following feature to add some restrictions:

  • $activeCustomers rules apply only on Active customers (boolean true or false)
  • $placeholderGroup used to restrict assignments to a specific group (group ID or false to disable). This option requires further explanation as detailed below

Let's assume we use the following configuration.

$groups['1'] = '10';
$groups['2'] = '25';
$groups['3'] = '100';

$placeholderGroup = '5';

The hook processes assignments only on clients assigned to group ID 5 (the placeholder), 1, 2 and 3. Let's see some examples:

  • Customer A has 250 domains and is assigned to group 5. After cron job he's moved to group 3
  • Customer B has 10 domains and is assigned to group 1 and transfers away one domain. After cron job he's moved to group 5 as now he owns only 9 domains

The placeholder can also be one of the existing group as in the following example:

$groups['1'] = '10';
$groups['2'] = '25';
$groups['3'] = '100';

$placeholderGroup = '1';

In this case the 10 domains requirement for group 1 is ignored. The hook keeps track of changes to clients' group in the Activity Log.

Get the Code

Exempt Existing Clients from Affiliate Commissions

If a visitor places an order for a product or service with the affiliation cookie present, the affiliate earns a commission. The problem is that for WHMCS visitors and customers are the same thing meaning that it gives commissions to affiliates even for orders placed by existing customer.

The hook prevents WHMCS from paying commission for customers registered on your from a given number of days. For example if you set $numberOfDays = '30', WHMCS stops paying commissions for new orders placed by customers registered from more than 30 days on your site.

Get the Code

Prevent changes to Client Custom Fields

WHMCS has an in-built function to lock client profile fields you want to prevent clients being able to edit from clientarea (eg. email, company name). This feature however is not avaiable for client custom fields. Making such fields "disabled" via HTML is not an option. Anyone with bit of knowledge can skip this form of protection.

This hook acts as the last line of defense. It grants that no customer can submit changes. If necessary it can be enabled also for WHMCS Administrators.

If you need something more professional, Billing Extension can bring your WHMCS to the next level with things like monthly invoicing, electronic invoicing, customer retention, Facebook Pixel and much more.

Get the Code

Quote to Invoice conversion without redirect

If you are sending out a lot of quotes on a daily basis, the fact that WHMCS forces a redirect to the newly issued invoice could be frustrating. This hook prevents WHMCS from performing the redirect allowing you to keep woriking on the quote.

Get the Code

Remove/Hide Breadcrumb

WHMCS prepends Portal Home to breadcrumb. There's nothing wrong with that but some people don't like it. This hook removes it from all WHMCS pages.

Bonus tip: if you don't want to use an action hook, you can use the following CSS. The result is the same.

.breadcrumb li:first-child {
    display:none;
}
.breadcrumb li:nth-child(2):before {
    content:" ";
}

Get the Code

Knowledgebase Author

WHMCS doesn't store any information about author - the administrator who published a KB article. This hook automatically adds a new column in tblknowledgebase named kt_author (the kt_ prefix is important to avoid naming collision). When an admin adds an article to KB the same hook stores author information and shows it on screen.

Get the Code

Knowledgebase Last Updated Date

WHMCS doesn't store Last Updated date when you edit Knowledgebase articles but you can retreive from Activity Log. It's not a stylish solution but it works. The hook adds lastupdated element to the existing $kbarticle Smarty array so that you can display it in your KB template file.

If you're looking for something more professional and up to date, learn how to benefit from WHMCS SEO using WHMCS as CMS.

Get the Code

Login as Client Language

Every time an administrator uses Login as Client, WHMCS overrides the default language of the selected customer with the one used by the administrator in WHMCS backend. This is bad because you're unknowingly changing the default language for your customer. This also applies for languages that can't be used in clientarea.

Let's say your clientarea is in italian and you're using WHMCS backend in english. When you perform the Login as Client, WHMCS switches customer's language from italian to english and there's no way back. The customer in question is stucked with a language he cannot change. The following hook prevents that to happen.

Get the Code

Prevent emails to be sent based on Client Group

The hook prevents WHMCS from sending General Messages email templats to specific client groups based on a sort of blacklist.

Get the Code

Abort auto-provisioning when there's a Note in the Order

A customer orders a VPS and adds notes to request a particular configuration that requires your manual intervention. In case you're using auto-provisioning, there's no way to stop WHMCS from creating the VPS to let you intervene manually. This hook stops auto-provisioning when there's a note in the order.

Get the Code

Rename Addon Module Label

Let's say you don't like how we named Mercury, Commission Manager, Billing Extension addon modules and you want to change them to CMS, Affiliates and Accounting. Simply change the following hook accordingly. It will work with any WHMCS module.

Get the Code

Add button next to Module's Functions

Here is how you can add a button next to Create, Suspend, Unsuspend (...) functions in product/service view.

Get the Code

Announcements Meta Description

Before you think «Great! I can finally add meta descriptions to WHMCS announcements» wait for a sec and understand the following:

  • WHMCS is terrible at SEO. You need more than this hook to see improvements
  • Meta description is not a ranking factor. It doesn't affect your rankings but CTR

You can use the same approach to implement other meta tags but stay away from meta keywords. It is useless and has been deprecated more than a decade ago by all search engines.

Get the Code

Prevent Indexing on Search Engines

With this hook you can stop search engines from indexing your WHMCS site. This is particularly useful for test installations and for sites you still need to launch. The hook adds noindex meta tag in the <head> of your WHMCS that "tells" search engine crawlers to not index pages.

Get the Code

Promotion Code in Email Template

Invoice Payment Confirmation is an Email Template that WHMCS sends to customers when they pay invoices. By default this message doesn't include any information about promotions. The following hook add coupon code to the invoice recepit (if a promo has been applied).

Once the hook has been added to WHMCS, you can edit Invoice Payment Confirmation email template to customize the look of your message like follows.

{if $assigned_promos}
Promo below:
{foreach from=$assigned_promos item=promo}
{$promo}
{/foreach}
{/if}

Here is a preview of the message.

Get the Code

Promotions array in Email Templates

This hook is capable of including information about existing promotions (aka coupon codes) in any email notifications sent by WHMCS. It adds {$promotions} Smarty array to any of the specified email templates. You only need to iterate records with a Smarty {foreach} as follows.

{if $promotions}
Active Promotions:
<ul>
	{foreach from=$promotions item=promo}
	<li>{$promo.code} ({if $promo.type == 'Percentage'}{$promo.value}% discount{elseif $promo.type == 'Fixed Amount'}{$promo.value} € discount{elseif $promo.type == 'Price Override'}Price override {$promo.value} €{elseif $promo.type == 'Free Setup'}Free Seutp{/if})</li>
	{/foreach}
</ul>
{/if}

Here's a preview of the following code. Keep in mind that the hook automatically removes expired promotions from the array.

Get the Code

Automatically Accept Order when Invoice is Paid

WHMCS requires administrators to manually accept orders even if automation tasks already took place. The hook automatically accepts orders via API when Invoice is paid.

Get the Code

Cancel Order when an Invoice is beign Cancelled

When an invoice is Mark Cancelled the related order (if exists) is automatically set Cancelled.

Get the Code

Ban Order Expiration

WHMCS administrators can ban IP on the fly directly from order view. The problem with this feature is that WHMCS automatically sets the ban to expire the last day of current year. As you can imagine there's an huge difference between receiving the ban on January instead of December. This hook makes sure that bans always last one full year no matter what.

Get the Code

Hide Google Invisible reCAPTCHA Badge

All it takes to hide Google Invisible reCAPTCHA Badge (bottom-right corner) is a CSS rule. If you don't want to edit your CSS and/or want preserve the change with template updates, use this hook. Before you ask, yes, the correct way to hide the Badge is to use opacity. Using things like display: none and visibility: hidden breaks reCAPTCHA.

Get the Code

Chatstack Disable for Logged-In Users and Administrators

In case you have now idea of what Chatstack is, let me give you a little bit of background. It's an official module of WHMCS that allows to chat with visitors and track their activities. We use it ourselves on our site. It's the little badge at the bottom right corner. Visitors can click it to start chatting with us. In case we're not online, the badge redirects to contact us.

It is worth to mention that in past Chatstack was named LiveHelp. You can purchase it directly from Chatstack or from WHMCS Marketplace. Ignore all the negative reviews. Most of them are from people that have no idea of how to install and configure it.

Let's now move to the hook itself. Once Chatstack is installed on your WHMCS site, it starts tracking everyone including WHMCS administrators and logged-in users. This creates the following problems:

  • You receive notifications about administrators' activities
  • Chatstack doesn't distinguish between visitors and administrators
  • Chat should be reserved for pre-sales but customers can use it for technical support

The hook we made provides two options that allows to:

  • Stop tracking and notifying administrators' activities
  • Prevent logged-in users (existing customers) to use the chat

The only requirement is that you remove any existing integration between WHMCS & Chatstack. The action hook handles everything and supports also WHMCS multi-domain and multi-brand.

Get the Code

Notify Fraudulent Orders

When an order is set as fraud, prior to the change of status actually occurring, the hook sends email notifications to all existing WHMCS administrators (disabled administrators are ignored).

Get the Code

Free Reports Collection

Yay! We didn't stop to action hooks. Below you can find a list of custom WHMCS Reports to give you more in-depth reporting and analytics on the performance of your business. Let's go!

Churn Rate

Rate at which customers stop doing business with you. The report includes charts and graphs to help you interpret the data. For every month of the year you can see:

  • No. of products/domains at the start of the month
  • No. of products/domains at the end of the month
  • Monthly change in the No. of products/domains
  • No. of products/domains acquired during the month
  • No. of products/domains lost during the month
  • Churn rate (percentage)

The reports also shows cumulative statistics (products & domains combined). Churn rate is usually connected to customer retention. The linked article describes how to retain customers. For your information the formula to calculate churn rate is the following.

(Lost products/domains at the end of Time Period / Acquired products/domains at the end of Time Period) * 100

The report doesn't take into account products/services with any of the following billing cycles: One Time, Completed, Free Account. The reason for that is very simple. Such products don't support renewals hence churn rate doesn't apply.

Get the Code

Free Modules Collection

Yep, we also give you some handy modules that can help you with most common operations in WHMCS.

Plesk Checker

Error code: 1013. Error message: Customer with external id 'whmcs_plesk_XX' is not found in panel.

If you're using Plesk I bet you've seen this error at least once in your life. If you try to google it, you'll find a page from Plesk documentation that claims this bug (I quote) «has been already fixed for all versions». I respectfully disagree.

Probably I'll need a week to explain why this error appears. Let's skip this boring part. Fixing the error requires your manual intervention on psa database (Plesk) and more in particular on clients.external_id column as described in the article previously linked.

We created a module that makes this "find and replace" process less frustrating and quicker. Not only it automatically detects all hosting accounts that are returing Error code: 1013 but also additional ones. Here's a preview.

Get the Code

Comments (12)

  1. Rainer Mbongo 1 month ago

    could create a product limiter per account. eg One can only order on free trial

    1. Katamaze | Davide Mantenuto 1 month ago

      You can use this hook to specify products that can be ordered only once per customer.

  2. Jorge Magalhaes 1 month ago

    Could you create a hook that add vat tax to the add funds invoices

    1. Katamaze | Davide Mantenuto 1 month ago

      I'm sorry but this is not possible as such feature is already part of Billing Extension. As we stated on Github, we're open for small and medium-sized projects not in contrast with what we are already selling.

      In any case adding tax to credit is more complex than you think. When you start charging taxes on add funds invoices, you also need to extract VAT every time credit is applied to invoices. If you don't do that customers pay taxes twice: when they add funds and when they apply credit. In order to achieve this goal you need more than an action hook.

  3. Jorge Magalhaes 1 month ago

    Create a new hook that change the client to a new group based on the quantity of the active registered domains in the client account

    1. Katamaze | Davide Mantenuto 1 month ago

      That's a good idea. I opened a feature request on Github this way you can follow it an receive a notification when the hook is ready for use. It will probably take a couple of days.

    2. Katamaze | Davide Mantenuto 1 month ago

      We just finished to create the hook you requested. You can find it here.

    3. Jorge Magalhaes 1 month ago

      Now the only thing i think that lacks in this hook is the possibility to restrict the group change for a specific customer or if the client belongs to a specific group

    4. Katamaze | Davide Mantenuto 1 month ago

      Nice idea. The script has been updated. Now you can set a group that acts as a sort of placeholder

  4. Jonas 22 days ago

    Could you create a hook that shows customers' own IP and location at the top of their client area?

    1. Katamaze | Davide Mantenuto 21 days ago

      I need more details. Are you talking about geolocalizing customers and showing effective IP/location in admin area? If so, what's the purpose?

  5. parsa aminian 18 days ago

    hi LoginAsClientPreserveLanguage.php hook is not working on whmcs 7.10 . could you please test it ?

Speak Your Mind Cancel Reply