All Activity
- Today
-
Course1 joined the community
-
onlinechemistrytutoring joined the community
-
ophost joined the community
-
There are few issues in the hook logic for applying credit and cancelling invoices: Incorrect array index usage in the loop You had: foreach ($invoiceData['invoices']['invoice'][0] as $invoice) This loops only over the first invoice. Use: foreach ($invoiceData['invoices']['invoice'] as $invoice) Incorrect object access You used: $invoiceId = $invoice->'id'; $creditamt = $invoice->'credit'; But $invoice is an associative array, not an object. Use: $invoiceId = $invoice['id']; $creditamt = $invoice['credit']; Incorrect variable name You had: if ($canceInvoice['result'] == 'success') Correct to: if ($cancelInvoice['result'] == 'success') Syntax error in else You had: else } Correct to: else {
- Yesterday
-
I am hoping to aid the finance/billing team with writing off bad debt using a hook. The manual process is as follows (high level): 1. add credit 2. apply credit to invoice 3. cancel invoice ultimately term/inactivate client product/service. I am somewhat novice, but curious how things stand with the following code. I hope to simplify step 2 and 3 via hook. Am I approaching the logic properly? Any other guidance would be appreciated. As I understand it, when a credit is added to a client account, it will update the Credit value for the related client. <?php if (!defined("WHMCS")) die("This file cannot be accessed directly"); add_hook("ClientEdit", 1, "hook_applycredit_thencancel"); function hook_applycredit_thencancel($vars) { try { //vars from hook $clientid = $vars['userid']; $adminuser = 'sys.admin'; logActivity('Checking Client unpaid invoices ' . $clientid . ' from hook_applycredit_thencancel...'); // Get Invoices // Define parameters $command = 'GetInvoices'; $values = array( 'userid' => $clientid, 'status' => 'Unpaid', ); // Call the localAPI function $invoiceData = localAPI($command, $values, $adminuser); if ($invoiceData['result'] == 'success') { foreach ($invoiceData['invoices']['invoice'][0] as $invoice) { $invoiceId = $invoice->'id'; $creditamt = $invoice->'credit'; //Apply Credit $command = 'ApplyCredit'; $values = array( 'invoiceid' => $invoiceId, 'amount' => $creditamt, 'noemail' => '1', ); $addCredit = localAPI($command, $values, $adminuser); if ($addCredit['result'] == 'success') { logActivity('Credit amount ' . $creditamt . 'has been applied to Invoice ' . $invoiceId . ' by hook_applycredit_thencancel...'); } else { logActivity('Credit amount ' . $creditamt . ' FAILED to apply to Invoice ' . $invoiceId . ' by hook_applycredit_thencancel...'); } //Cancel Invoice $command = 'UpdateInvoice'; $values = array( 'invoiceid' => $invoiceId, 'status' => 'Cancelled' ); $cancelInvoice = localAPI($command, $values, $adminuser); if ($canceInvoice['result'] == 'success') { logActivity('Invoice ' . $invoiceId . ' has been cancelled by hook_applycredit_thencancel...'); } else { logActivity('Invoice ' . $invoiceId . ' FAILED cancel by hook_applycredit_thencancel...'); } } } else } logActivity('Credit application for ' . $clientid . ' FAILED by hook_applycredit_thencancel...' . $invoiceData['message']); } } catch (\Exception $e) { logActivity("Credit application failed: {$e->getMessage()}"); } }
-
Online checkers claim that post is AI written, so he may not have spent much time on it. 😉
-
blazedreamtechnologies joined the community
-
your a bit late to the party, we have already been through all of that long time ago. The issue with with all the fake users being created, which end sup increasing your licence cost. This happens even if the order is blocked as fraud. So you have to go through and manually keep deleting all those clients. As mentioned previously, I have no issues since implementing my solution.
-
chairsforcafe joined the community
-
Best Offer Glass joined the community
-
Easy Green Hosting started following Stripe "Uncaptured" Payments
-
Resolved 7.9.0 Stripe "Uncaptured" Payments
Easy Green Hosting replied to hkhost's topic in Using WHMCS
Hi. Same problem here. Last one was a few days ago: - a client entered an order - clicked to pay via stripe - failed to use its first card and re-attempted the payment - the second payment was confirmed on his side, but uncaptured in Stripe - whmcs just cleared all the data and did not register anything. We had to contact the customer, confirm his payment manually and re-create both client account and order in whmcs. This is just a bug! Why WHMCS does not register the order when the payment is confirmed on the client side and pending in our side?? Consider that NONE of us in this case (client and us) receive any communication via email: if the client does not contact us and we do not check stripe for uncaptured payments, we can't know that there was a new order. One of the first doubts a client can have after seeing a "paid" message from our website and his money blocked, and does not receive any confirmation whatsoever, is that we are a fraud. This is a very important thing to fix -
Kane William started following dealing with fake/spam orders
-
dealing with fake/spam orders
Kane William replied to snake's topic in Admin & Configuration Questions
One way to reduce fake or spam orders in WHMCS is by enabling email verification and using reCAPTCHA on your order forms. You can also set up fraud protection tools like MaxMind or other modules to flag suspicious activity. Limiting certain countries or IP ranges can help too if you’re seeing a pattern. Always review new orders manually if you're unsure. Hope this helps! -
Hi WHMCS Community, We’ve been facing an increasing number of fake registrations on our platform recently, and I’m looking for advice on how to prevent this issue without relying on third-party addons. While I understand there are many external solutions available, I’d prefer to explore options that are built directly into WHMCS or via custom configurations. Here are the steps I’m considering and would like feedback on: Email Verification: Ensuring that users verify their email addresses before completing registration. Captcha Integration: Adding a CAPTCHA to the registration form to prevent automated sign-ups. Custom Validation: Using custom fields or validation logic to prevent suspicious or malformed registrations. Rate Limiting: Limiting the number of registrations from a single IP address within a specific time period. Blacklist Management: Adding known fake email addresses or domains to a blacklist. Has anyone successfully implemented such measures in WHMCS? I’d appreciate any tips or recommendations to minimize fake sign-ups efficiently. Thanks in advance! Best Regards, Tipu Sultan
-
Certified Cupid Proposals changed their profile photo
-
jailtimeconsulting changed their profile photo
-
Certified Cupid Proposals joined the community
- Last week
-
Cadmus Security Services I changed their profile photo
-
pRieStaKos started following Account statements don't load
-
Account statements don't load
pRieStaKos replied to sahostking's topic in WHMCS 8.13 Release Discussion Board
The issue is on line 169. File is open so you can debug easy if ($carbonDate->lte($dateto)) { $balance += ($entry['credits'] - $entry['debits']); } $dateto is the date you set for the report filter. -
Independence Day in the United States, also known as the Fourth of July, is celebrated annually on July 4. WHMCS Services sale gives you a whopping 25% off any of the following WS Modules products. From NOW until July 7th. Go to whmcsservices.com, select any WS Modules product, and enter the special code 4july25, and you will automatically get 25% off the list price How Long Will this Sale Last? Expires 7th July 2025 To take advantage of the sale, simply add WS Modules to your shopping cart. To get this 25% discount, you must use this discount code when you order. If you do not use this discount code when you order, you will NOT get the 25% off. Please remember to use the discount when you order. Do You Need Custom Development? Don't hesitate any longer! Contact us now! Chat with us through live support, or send in a ticket, or if you would like more information on any of our programs. If you have any questions, email us here Save even more! Hurry! Sale Ends July 7, 2025! Thanks again for choosing WHMCS Services. We appreciate your business! Our Social Media: Twitter Here Facebook Here Instagram Here LinkedIn: Here
-
On customers profile when clicking account statements we started to get this error on new version, any ideas? Oops! Something went wrong and we couldn't process your request. Please go back to the previous page and try again. For additional assistance, please reference the WHMCS TroubleShooting Guide » Error: Call to a member function lte() on bool in /home/my/domains/my.domain.com/public_html/modules/reports/client_statement.php:169 Stack trace: #0 /home/my/domains/my.domain.com/public_html/admin/reports.php(0): unknown() #1 {main}
-
How to Modify the "Server ID" Field Using API in WHMCS?
MOK9527 replied to MOK9527's topic in Using WHMCS
To be exact, regarding the definition of the ID of this server in the virtualization module in the module, is there any way to modify it? -
I am trying to modify the Server ID field for a specific product in WHMCS. This field is displayed in the product configuration section (as shown in the screenshot below), and I understand that it is usually handled automatically by WHMCS. However, I need to manually update this field using the WHMCS API. Could anyone please guide me on how to modify the Server ID for a product or client via the API? Specifically, I am interested in the best approach for updating this field and whether it’s safe to do so manually. Here are the details of what I want to achieve: I want to modify the Server ID associated with a product. Is there a specific API like UpdateClientProduct or another that should be used for this? Are there any risks involved in manually updating this field, or should this be handled automatically by the system? I would greatly appreciate any advice or examples on how to perform this task through the API.
-
Hi everyone, I'm excited to join the WHMCS community! I'm a digital creator from Peru focused on building simple and helpful web tools. One of my current projects is Calculadora IGV, a free online calculator for quickly computing IGV (Peru’s sales tax). I’m passionate about user-friendly design, localized web solutions, and improving the online experience for small businesses and individuals. I’m here to learn more about WHMCS, automation, and how I can better serve users through reliable hosting and billing platforms. Looking forward to connecting and learning from all of you!
-
calculadoraIGV changed their profile photo
-
driveronhire changed their profile photo
-
gundogdumobilya changed their profile photo
-
Has anyone come up with a good setup for a local development environment to be able to efficiently work on modules and themes efficiently?
-
i am also facing this
-
added cpanel servers and all its working all functions except whmcs connect. its throwing some error like liner1.mainweb.com refused to connect.
-
greenwebpage changed their profile photo
-
swifty45 changed their profile photo
-
Auto update and Admin url change/rename
WHMCS John replied to Sudipto Mahmud's topic in Admin & Configuration Questions
Hi @Sudipto Mahmud, Yes the auto-updater will update files with a customised admin and crons directories. For more information see: https://docs.whmcs.com/getting-started/configuring-whmcs/enhancing-security/#5-rename-the-whmcs-admin-area-directory -
You can remove the Edit with Sitejet Builder link from the left sidebar menu under the Actions sidebar when logged in as a client and looking at the Product Details page using this hook code: <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function (MenuItem $primarySidebar) { $actionsMenu = $primarySidebar->getChild('Service Details Actions'); if ($actionsMenu instanceof MenuItem) { foreach ($actionsMenu->getChildren() as $child) { if (strpos($child->getLabel(), 'Sitejet') !== false) { $actionsMenu->removeChild($child->getName()); } } } }); See the attached screenshots showing this custom hook file in place in the /includes/hooks/ directory. The screenshots show that this link is no longer there after this hook code is added. You would create a file named "remove_sitjet_link.php" and add the above code into it, and upload it to your /includes/hooks/ directory. I tested this with WHMCS version 8.13.1. I hope that this helps someone.
-
TinyMCE Editor for Support Tickets
WHMCS Danny replied to davet's topic in Admin & Configuration Questions
As of now, WHMCS does not provide built-in functionality in the support ticket editor to change font color directly through the WYSIWYG editor used in the admin or client area. However, here are a few important notes: The support ticket editor is fairly basic and does not include advanced formatting options like font color changes. If you're using custom templates or modules, you might be able to extend the editor's capabilities, but this would require development work and is not officially supported by WHMCS. Some users have customized the client area templates (e.g., clientareatickets.tpl) to change the appearance of ticket statuses or text using CSS, but this applies to how tickets are displayed, not how text is entered or formatted in replies If you're looking to add this functionality, it would require integrating a more advanced editor (like TinyMCE or CKEditor) into the WHMCS admin or client area, which would involve custom development. I would recommend posting on the Service Offers & Requests section, or if you know how to code, post in our Developer Corner section, both are located under the Developing & Extending WHMCS forum. Additionally, you may want to vote on this similar feature request: https://requests.whmcs.com/idea/ability-to-change-tinymce-default-settings-for-font-size-etc I just added my own vote to it to try and gain some traction. -
add to custom.css #sitejetPromoPanel {display:none} [data-identifier="sitejet"] { display: none !important; }
-
Hi I would like to sell my Maxhost theme, made for WHMCS
-
PatchMakers changed their profile photo
-
/whmcs-bridge/cart?a=confdomains "404 page not found error"
Sakhile replied to abdulah's topic in Developer Corner
Hi Abdullah, I am having the same problem, how did you eventually sort out your problem? -
Inkox changed their profile photo
-
Yes, it is possible to connect WooCommerce to WHMCS, and there are multiple ways to achieve this depending on your use case: ✅ Integration Scenarios & Solutions 1. Sell WHMCS Products via WooCommerce Use Case: Sell hosting, domains, or services using WooCommerce but manage provisioning, invoicing, and automation in WHMCS. Solution: Use a plugin like: WooCommerce WHMCS Bridge (by ModulesGarden) Custom-built plugin using WHMCS API (recommended for full control — Govaio is already building one like this) 2. Sync WooCommerce Customers to WHMCS Use Case: Automatically create WHMCS users from WooCommerce registrations. Solution: Use WHMCS API (AddClient, GetClients, etc.) in a custom plugin or bridge solution. 3. Unified Login System Use Case: Customers log in once and can access both WooCommerce and WHMCS data. Solution: Implement WHMCS SSO or JWT token-based login. Store WHMCS client ID as meta data in WordPress. 4. Invoice and Payment Sync Use Case: Use WHMCS for recurring invoicing but WooCommerce for frontend checkout. Solution: Use WHMCS API to create invoices and get invoice links. Optionally trigger invoice creation on WooCommerce order status change. 🔧 Technical Tips WHMCS API Endpoint: https://yourdomain.com/whmcs/includes/api.php Use WooCommerce Webhooks + WHMCS API for syncing You may need cron job syncing if you're building a full connector Would you like a plugin built to connect both systems based on your flow? I can help you with that.