Free Addon for WhatsApp WHMCS Notification Module for Meta, Evolution API and Baileys. Send Free WhatsApp Message Automatic by Hook, Manual or Custom.
- PHP: 8.1+;
- WHMCS: 8.6+
- IonCube: 12+
- Data Base SQL with permissions
- ALTER
- CREATE
- DELETE
- INDEX
- LOCK TABLES
- SELECT
- DROP
- INSERT
- REFERENCES
- UPDATE
- Download the module
notifications.zip
file here. - Make sure to keep the file intact until you're ready to upload it to your WHMCS installation.
- Upload the file
notifications.zip
to the root installation directory of your WHMCS.- For example, if WHMCS is installed in
public_html
, upload the filenotifications.zip
topublic_html
.
- For example, if WHMCS is installed in
- Extract the file
notifications.zip
.- it will add a folder in WHMCS/modules/addons/lknhooknotification.
- Remove the remaining notifications.zip.
- Go to the WHMCS admin panel, select Options > Addon Modules, find the module and, once found, click "Activate".
🔎 Tip: For more information on how to install Addon Modules in WHMCS, see: https://docs.whmcs.com/8-13/addon-modules/addon-modules/
- Before starting, backup your WHMCS and database — this ensures safety in case something goes wrong.
- Access the WHMCS admin panel and deactivate the module, it not going to erase your database or module configuration, but will make sure that the module do not run and you area updating.
- Go to this link and download the
notifications.zip
file of the latest module release. - Extract the file
notifications.zip
.- it will add a folder in WHMCS/modules/addons.
- Remove the remaining .zip.
- Go to the WHMCS admin panel, select Options > Addon Modules, find the module and, once found, click "Activate".
- Access this link for more information on how to use and configure the notifications.
- Go to your WHMCS admin panel, navigate to Options > Addon Modules, find the WhatsApp and Chatwoot module and deactivate it.
- Access the root directory of your WHMCS, and go to the folder: /modules/addons.
- Inside the Addons folder, locate and delete the lknhooknotification folder.
- Delete the table created by the module in your WHMCS database; look for tables with names similar to the module, such as: mod_lkn_hook_notification*.
- SQL: BE CAREFULL. Run SQL commands:
DROP TABLE IF EXISTS `mod_lkn_hook_notification_bulks`;
DROP TABLE IF EXISTS `mod_lkn_hook_notification_localized_tpls`;
DROP TABLE IF EXISTS `mod_lkn_hook_notification_notif_queue`;
DROP TABLE IF EXISTS `mod_lkn_hook_notification_reports`;
DROP TABLE IF EXISTS `mod_lkn_hook_notification_configs`;
DROP TABLE IF EXISTS `mod_lkn_hook_notification_config`;
For types documentation, follow https://phpstan.org/writing-php-code/phpdoc-types.
- Generate stubs
- Update the hardcoded current version
- Generate documentation
You need to run php stubs_generator.php to generate the code stubs, then copy the contents of stubs.php
and paste them into the stubs.php file in the notifications repository.
Additionally, the dependency used to generate stubs does not support Enums, so it's necessary to manually copy the contents of the files under the /Config directory and paste them into stubs.php
.
By running the command below, both internal and public documentation will be generated:
php phpDocumentor.phar --config=phpdoc.private.xml && php phpDocumentor.phar --config=phpdoc.public.xml
You need to push the /docs/public folder to the notifications repository on the main branch.
To view the internal documentation page, simply open the index.html file in /docs/public in your browser.
- WHMCS Addon Modules: https://developers.whmcs.com/addon-modules/
- WHMCS Hook Index: https://developers.whmcs.com/hooks/hook-index/
- Bootstrap 3.4: https://getbootstrap.com/docs/3.4/components/
- Bootstrap 3.4: https://getbootstrap.com/docs/3.4/css/
- Bootstrap 3.4: https://getbootstrap.com/docs/3.4/javascript/
- FontAwesome 5: https://fontawesome.com/v5/search
- Graph API WhatsApp
- Understanding the MessageTemplateParser class
- Understanding the Request to the WhatsApp API
- Send message template
- List message template
How to test the integration
- Create a free test account here. Look: https://www.chatwoot.com/docs/user-guide/setup-your-account/create-an-account/#i-am-using-the-cloud-version
- https://www.chatwoot.com/docs/product/channels/api/send-messages/
- About the Chatwoot APIs: https://www.chatwoot.com/docs/contributing-guide/chatwoot-apis
The one used by the module to send messages is the Application API.
- https://www.chatwoot.com/developers/api/#tag/Custom-Attributes/operation/add-new-custom-attribute-to-account
- https://www.chatwoot.com/hc/user-guide/articles/1677580558-website-live-chat-settings-explained
- https://www.chatwoot.com/hc/user-guide/articles/1677502327-how-to-create-and-use-custom-attributes
These are the notifications that are automatically executed along with a WHMCS hook.
Manual trigger notifications require an administrator action to be executed. They typically use a WHMCS hook ending in Output to display a button that, when clicked, triggers the notification.
In this case, the module simply provides a way to integrate notifications that use the same output hook. Currently, there are only two notifications of this type: the InvoiceReminder notifications, which use the AdminInvoicesControlsOutput hook.
They are placed here: /modules/addons/lknhooknotification/src/Notifications/Custom
They inherit the class. AbstractCronNotification
.
To test, just set up locally or use ngrok:
docker run --net=host -it -e NGROK_AUTHTOKEN={NGROK_AUTHTOKEN} ngrok/ngrok:latest http 8080
Copy the given URL and place it in the Evolution API configuration in the module.
To test, just set up locally or use ngrok:
docker run --net=host -it -e NGROK_AUTHTOKEN={NGROK_AUTHTOKEN} ngrok/ngrok:latest http 8080
Copy the given URL and place it in the Baileys API in the module.
[
{
"messagename": "Password Reset Validation",
"relid": 1,
"mergefields": {
"user_first_name": "Jorge",
"user_last_name": "Mendes",
"user_email": "[email protected]",
"reset_password_url": "https://www.WHMCSDOMAIN.com/index.php?rp=/password/reset/redeem/c96b9b7e2248870f4e8933009399232ce5d06a5e649cba2c6e6fd9c56f402c7f",
"company_name": "Link Nacional",
"companyname": "Link Nacional",
"company_domain": "https://www.WHMCSDOMAIN.com",
"company_logo_url": "",
"company_tax_code": null,
"whmcs_url": "https://www.WHMCSDOMAIN.com/",
"whmcs_link": "<a href=\"https://www.WHMCSDOMAIN.com/\">https://www.WHMCSDOMAIN.com/</a>",
"signature": "---<br />\r\nLink Nacional<br />\r\nhttp://www.WHMCSDOMAIN.com",
"date": "Tuesday, 20th May 2025",
"time": "10:22am",
"charset": "utf-8"
}
}
]