This is a repository dedicated to developers who want to collaborate in the growth of the WHMCS WhatsApp Cloud API module - Download WHMCS Addon, See more information about the module:
You can fork this repository, build your custom hooks, and then open a pull request to the dev branch. We will evaluate your code, ensure it runs on the latest version of the module, and add it to the main branch for others to use your features.
If your feature is requested by many users, it can be adapted and integrated natively within the module.
- Code style must follow PSR-12. You can achieve this by using the
.php-cs-fixer.php
file. - We encourage contributors to write commits, code comments, issues, and other documentation in English, if possible.
- The code should be compatible with PHP 8.1 and the latest version of WHMCS.
Take a look on the wiki about How to create a customized hook.
For fast setup, we strongly recommend the use of Docker, VS Code and Dev Container. The settings and extensions are defined on .devcontainer/devcontainer.json you do not need to edit it.
- Install Docker Desktop.
- Install VS Code.
- Install the Dev Container extensions for VS Code.
- Clone this repository and open it on VS Code.
- Make sure Docker is running.
- Then, press CTRL + Shift + P and type "Rebuild Without Cache" and press enter for Dev Container.
- Now, VS Code will automatically setup PHP 8.1 and the necessary extensions and you can start coding.
Optionally, you can setup SFTP for uploading a file to your WHMCS when you make changes to it. Take a look at .vscode/sftp.example.json.
Now, you must test your implementation and submit a pull request to the dev
branch.
Keep in mind that on free plan you will be able to have only 3 custom hook files. Otherwise, the module will not run any hook.