Jump to content


Popular Content

Showing content with the highest reputation since 12/27/22 in all areas

  1. 3 points
    Hi Friends, I have found some users that may need to add certain HTML code for many different reasons to the client area of WHMCS. This could be for tracking code, Google tag manager or a custom Live chat addon that you need to ensure their custom HTML code is added to a certain section on the page via HTML or JS code per the instructions of what you are adding to the client area pages. The best way to achieve this would to use a custom hook. Depending on where you need to place your HTML code on the page, you would use one of the below hooks: If you want to add HTML code to be placed in the <head> section of the page your would use the ClientAreaHeadOutput hook. If you want to add HTML code to be placed in the <body> section of the page you would use the ClientAreaHeaderOutput hook. If you want to add HTML code to be placed in the <footer> section of the page you would use the ClientAreaFooterOutput hook This assumes you are already familiar with creating hooks. For further information to learn how to create hooks please review the following developers documentation: https://developers.whmcs.com/hooks/getting-started/ Once your hook is saved under your /includes/hooks/ directory in your WHMCS installation, you can use the use your browsers developer tools to Inspect the client area pages to check that your code has be inserted where it needs to be placed or where you wanted it to be placed on the page. Instructions: I have provided example snippets below for creating a hook for each section to add HTML code to the client area pages for the <head>, <body> or <footer> sections of the client area pages after the PHP has been rendered. All you will need to do is insert your HTML code in between the <!-- Start insert code here --> and <!-- End insert code here --> comments in the below examples. ClientAreaHeadOutput Hook Example: The code you place in between the comments referenced above will add your HTML code to the <head> section of every client area page: <?php /** * The code below will be added in the <head> section * @author WHMCS Danny */ add_hook('ClientAreaHeadOutput', 1, function($vars) { return <<<HTML <!-- Start insert code here --> <!-- End insert code here --> HTML; }); Source: https://developers.whmcs.com/hooks-reference/output/#clientareaheadoutput ClientAreaHeaderOutput Hook Example: The code you place in between the comments referenced above will add your HTML code to the <body> section of every client area page: <?php /** * The code below will be added in the <body> tag section * @author WHMCS Danny */ add_hook('ClientAreaHeaderOutput', 1, function($vars) { return <<<HTML <!-- Start insert code here --> <!-- End insert code here --> HTML; }); Source: https://developers.whmcs.com/hooks-reference/output/#clientareaheaderoutput ClientAreaFooterOutput Hook Example: The code you place in between the comments referenced above will add your HTML code to the <footer> section of every client area page: <? /** * The code below will be added to the <footer> tag section * @author WHMCS Danny */ add_hook('ClientAreaFooterOutput', 1, function($vars) { return <<<HTML <!-- Start insert code here --> <!-- End insert code here --> HTML; }); Source: https://developers.whmcs.com/hooks-reference/output/#clientareafooteroutput I hope this information helps anyone who is looking on how to add HTML/JS code to your WHMCS client area, such as, a tracking code, Google tag manager or a custom Live Chat addon etc. Best Regards, - WHMCS Danny
  2. 2 points
    We've successfully blocked him by using phrases instead of email or IP. Just look for the domains he includes, and block the name itself (just the name, not the ".com") and a few others he uses. They will always have a link with one of them. Be creative, and he can be stopped.
  3. 2 points
    Hello @Kian I think you may create your custom API to cancel PayPal subscription at first you will create php file in this folder "includes/api" let's name it "cancelpaypalsubscription.php" I have made it for you <?php /* * @ Cancel Paypal Subscription * @ 2023/01/10 * @ By Aladdin Jiroun */ $whmcs = WHMCS\Application::getInstance(); use \WHMCS\Module\GatewaySetting; $subscriptionID = $whmcs->get_req_var("subscriptionID"); $apiusername = GatewaySetting::where('gateway', '=', 'paypal')->where('setting', '=', 'apiusername')->first()->value; $apipassword = GatewaySetting::where('gateway', '=', 'paypal')->where('setting', '=', 'apipassword')->first()->value; $apisignature = GatewaySetting::where('gateway', '=', 'paypal')->where('setting', '=', 'apisignature')->first()->value; $apiresults = array(); $url = "https://api-3t.paypal.com/nvp"; $postFields = array(); $postFields["BUTTONSOURCE"] = "WHMCS_WPP_DP"; $postFields["USER"] = $apiusername; $postFields["PWD"] = $apipassword; $postFields["SIGNATURE"] = $apisignature; $postFields["VERSION"] = "3.0"; $postFields["METHOD"] = "ManageRecurringPaymentsProfileStatus"; $postFields["PROFILEID"] = $subscriptionID; $postFields["ACTION"] = "Cancel"; $postFields["NOTE"] = "Automatic Subscription Cancellation"; $result = curlCall($url, $postFields); parse_str($result, $resultsArray); $resultsArray["PROFILEID"] = $subscriptionID; if (strtoupper($resultsArray["ACK"]) == "SUCCESS" && $resultsArray["PROFILEID"]) $apiresults = array("status" => "success", "rawdata" => $resultsArray); else $apiresults = array("status" => "error", "rawdata" => $resultsArray); then you can use this api inside whmcs like this $command = 'cancelpaypalsubscription'; $postData = array( 'subscriptionID' => 'XXXX', ); $results = localAPI($command, $postData);
  4. 2 points
    I don't think there's a way to cancel the subscription from the WHMCS API, unfortunately. The subscription can be cancelled using the PayPal API but I think it would be best to update the subscription to match the new recurring price instead: https://developer.paypal.com/docs/api/subscriptions/v1/#subscriptions_patch
  5. 2 points
    Hi @Abdelkarim, Domain addons (DNS Management, Email Forwarding and ID Protection) are configured under your Domain Pricing settings. Read about Domain Addons in our Docs If you do not want to offer these addons, then you will need to disable them for each of your TLDs. Doing this in bulk can be a bit of a chore, so you can disable all three addons for all of your TLDs by running the following SQL command. CAUTION: Always take a backup before interacting with your database directly. UPDATE `tbldomainpricing` SET `dnsmanagement`='0',`emailforwarding`='0',`idprotection`='0' WHERE 1 Hope this helps 😎 Cheers, Josh
  6. 1 point
    It's a hook someone posted here on this board. It allows us to see if anything was unexpectedly blocked. This is likely it:
  7. 1 point
    It shows a 404 because they deleted it leaving no trace 😄 Btw stop waiting and do it yourself. Sadly there's no other option. I recently managed to auto-update domains in line with changes in Registrars costs. Next week I'll add monthly updates for all prices based on inflation rate retreived from official statistical offices like Eurostat, Istat etc. It is well worth the effort since at the end of the day it lets you cover unnecessary financial loss. It puzzles me how this is still not part of WHMCS but it is what it is. After 10 years we are still waiting. The lesson here is: hire someone that can code it or do it youself 😐
  8. 1 point
    These have been working for us: "boostleadgeneration" / "Talk With Web Visitor" / "talkwithwebvisitor" Just those phrases, no "quotes", in three separate rules.
  9. 1 point
    It depends. What module (if any) is used for those services? Most likely, that button is added through the module code in a _ClientArea function.
  10. 1 point
    It's fairly easy to fix with a hook. The below will block a single address. <?php add_hook('TicketOpenValidation', 1, function($vars) { if($vars['email'] === 'something@example.com') return 'Piss off you dipshit'; }); You can also use it to block the same senders that you've configured in the spam settings: <?php use WHMCS\Database\Capsule; add_hook('TicketOpenValidation', 1, function($vars) { $blockedAddresses = Capsule::table('tblticketspamfilters') ->where('type', 'sender') ->pluck('content') ->toArray(); if(in_array($vars['email'], $blockedAddresses)) { return 'Message'; } }); Hope that helps!
  11. 1 point
    Hey @ganje! 😏 Let me for completeness also point out that availability checks based on whois are a) slow b) not always reliable c) not supporting premium domain names that's why the better idea is to stick to your registrar as provider even though this isn't providing what you're looking for.
  12. 1 point
    Hello, I have made a hook for you add_hook('EmailPreSend', 1, function($vars) { $merge_fields = []; foreach ($vars['mergefields']['service_custom_fields_by_name'] as $field) { if ($field['name'] == 'Operating system') { // consider 'Operating system' here $OperatingSystem = $field['value']; break; } } if ($OperatingSystem == "windows-server-2019") // consider "windows-server-2019" here { $merge_fields['service_password'] = "123123"; } return $merge_fields; }); consider the names of Operating system and windows-server-2019 to be as you have them on your website exactly and tell me if it worked with you
  13. 1 point
    Google Fonts is a library of 1462 open source font families. It's used by many websites and applications - including WHMCS - to display high-quality and appealing fonts consistently across different devices, platforms and Operating Systems. The fonts are hosted and maintained by Google, eliminating the need to maintain your own font repository. Some users may wish to not use Google Fonts, for example if access is blocked by national firewalls or its use restricted by legislation. This guide demonstrates how to do so. There are two approaches: Disabling Google Fonts - Quick and easy. Visitors will see the nearest equivalent font per their device or OS settings. Hosting Google Fonts on your website - Provides the benefits of Google Fonts, with additional maintenance overhead for you. This guide assumes familiarity with the Themes documentation and the described modifications are being made to a Child Theme of the Twenty-One parent theme. Disabling Google Fonts Edit the /template/$templatename/includes/head.tpl template file from your Child Theme directory. Delete the following line: <link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600&display=swap" rel="stylesheet"> Save the file. That's all there is to it! Hosting Google Fonts on your website Download the fonts used by WHMCS using the Google Web Fonts Helper: Open Sans Raleway Indie Flower Unzip the files. Upload the contents of the zip files to the /template/$templatename/css/ directory Edit the /template/$templatename/css/custom.css (create the file if it doesn't already exist) in your Child Theme directory. Add the following content: /* open-sans-regular - latin */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: url('open-sans-v34-latin-regular.eot'); /* IE9 Compat Modes */ src: local(''), url('open-sans-v34-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('open-sans-v34-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */ url('open-sans-v34-latin-regular.woff') format('woff'), /* Modern Browsers */ url('open-sans-v34-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */ url('open-sans-v34-latin-regular.svg#OpenSans') format('svg'); /* Legacy iOS */ } /* raleway-regular - latin */ @font-face { font-family: 'Raleway'; font-style: normal; font-weight: 400; src: url('raleway-v28-latin-regular.eot'); /* IE9 Compat Modes */ src: local(''), url('raleway-v28-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('raleway-v28-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */ url('raleway-v28-latin-regular.woff') format('woff'), /* Modern Browsers */ url('raleway-v28-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */ url('raleway-v28-latin-regular.svg#Raleway') format('svg'); /* Legacy iOS */ } /* indie-flower-regular - latin */ @font-face { font-family: 'Indie Flower'; font-style: normal; font-weight: 400; src: url('indie-flower-v17-latin-regular.eot'); /* IE9 Compat Modes */ src: local(''), url('indie-flower-v17-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('indie-flower-v17-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */ url('indie-flower-v17-latin-regular.woff') format('woff'), /* Modern Browsers */ url('indie-flower-v17-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */ url('indie-flower-v17-latin-regular.svg#IndieFlower') format('svg'); /* Legacy iOS */ } Edit the /template/$templatename/includes/head.tpl template file from your Child Theme directory. Delete the following line: <link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600&display=swap" rel="stylesheet"> Save the file. Fonts are now being loaded from your website for visitors, and not from the Google Fonts repository. At the time of writing this post, this process was tested on the latest stable release of WHMCS 8.6.1. If you have any feedback or questions, please feel free to reply to this thread!
  14. 1 point
    Just realized the get_addon function wasn't included: /** * * For unknown reasons you can't feed GetClientsAddons * a specific addon ID. The addonid parameter it accepts * is for the parent addon, not a provisioned service's addon. * * Returns $addon array exactly like the WHMCS API * * Reference: https://developers.whmcs.com/api-reference/getclientsaddons/ * * * * @return array */ public static function get_addon($serviceid, $addonid){ $results = localAPI('GetClientsAddons', array('serviceid' => $serviceid)); $addon = null; foreach ($results['addons']['addon'] as $a){ if ($a['id'] == $addonid){ $addon = $a; break; } } return $addon; } Note: I realize an SQL query might be more efficient, however ensuring the result formatting matches the array notation and data from GetClientsAddons is important to me, and so this was the simplest way to ensure that consistency.
  15. 1 point
  16. 1 point
    Thanks 😌 I just finished coding it. I used Cancel command instead of Patch since what I need is cancelling subscription permanently. https://developer.paypal.com/docs/api/subscriptions/v1/#subscriptions_cancel Interesting. I didn't know PayPal still allowed NVP endpoints. Cool 👍 Thanks for the code btw. It will surely help many people.
  17. 1 point
    The documentation which details how to remove credits is located at: https://docs.whmcs.com/Adding_and_Working_With_Credit#Adding_or_Removing_Client_Credit
  18. 1 point
    Or read the payment methods with a hook, remove the one you want and return the array back to template.
  19. 1 point
    As I said a couple times in other posts, hreflang and more in general most SEO enhancements for WHMCS (including official ones 1, 2) are bad implementations based on the "just start coding" mindset. Some of them make things a lot worse or provide little to no help at all. Hreflang, SEO URLs, meta tags (...) don't make much sense when the core of the issue is that WHMCS is a session-based multilanguage system that also happens to be a duplicate content generator. In this context there's no point in planning any SEO strategy. Improvements on SERP would be laughable at best. Speaking of hreflang tag, it is advisable that your sitemap also includes hreflang. Problem is 99% of sitemap generators for WHMCS are useless since they are still based on WHMCS limitations. In conclusion WHMCS is not compatible with SEO & multilanguage and so most third-party plugins do.
  20. 1 point
    Are you sure about this? As far as I'm aware, they stopped the option to allow owned license holders to renew support and update to newer versions unless they moved to the subscription model. Of course, they had to honor anyone that had support paid upfront for several years but I remember they removed the option precisely to prevent someone from buying, for example, 10 years of support to avoid moving to the subscription model. If what you said is true, either it was a glitch in your account or WHMCS decided to back pedal and owned license holders can keep using their software with newer updates without moving to a subscription plan. I'm confused as everyone here in the forums discussed this and said they have no option but moving to a subscription plan to keep receiving updates. That email was years ago, which means you would have been stuck in version 7 like everyone else, I'm very confused how you purchased updates last year: Your WHMCS owned license will continue to function as it does today. You may continue to run your WHMCS installation using the owned license for as long as you would like. • You will not be able to purchase or renew support for your owned WHMCS license, effective immediately. • If you have an active support agreement with WHMCS for your owned license, we will continue to honor that support agreement until its expiration. If you do not have support for your WHMCS owned license, and you require product support or you would like to upgrade to a current version, you will need to upgrade to our standard license model. You can obtain a standard license by logging into the WHMCS customer portal (https://www.whmcs.com/members)
  21. 1 point
    I've just checked - it was Jan not Feb. We renewed our support in Jan 2021 and it ran out in Jan 2022. I guess some time in between those dates they stopped allowing support renewals. Version 8.3.2 was released some time near the end of 2021, so without any support now we are stuck with this version until we are prepared to pay the 2000% increase ransom of $2100 per year, instead of the $100 we were paying before. I honestly wouldn't mind paying the lower tier at $99 per month but as we are on the low end of the next tier, it's gonna hurt when we have to start paying. It's just too much, especially when you consider how poorly managed and maintained this software is.
  22. 1 point
    hello, I have created whmcs payment gateways before If you are interested we can program it for you, contact us here for more details.
  23. 1 point
    Hi @ahwaznoname, @Damo is absolutely right. The email template you are referring to is sent to admin users only. The template that you are looking for is called New Order Notification, and can be found in the Admin Messages category. You can manage all of your email templates (and their associated subjects) under System Settings > Email Templates. To modify the subject of an email message, edit the value of the Subject text box, and save your changes. Hope this helps 😎 Cheers, Josh
  24. 1 point
    Update: We have case CORE-17527 open with WHMCS development team around improving the responsive display of client area domain/service and case CORE-18368 open regarding the currency sidebar. For other issues, they want us to go and vote for features at: https://requests.whmcs.com
  25. 1 point
    I have never tested Stripe using 2 different WHMCS installations but I would imagine the problem, if it exists, could easily be solved by creating a 2nd Stripe profile/brand under your existing Stripe account. You'd then have 2 different sets of API keys for each installation whilst still being able to manage everything under your existing Stripe account: https://stripe.com/docs/account/multiple-accounts
  26. 1 point
  27. 1 point
    If you are completely new to this: in your WHMCS installation directory create a file ericjonesspam.php in directory /includes/hooks with the content @brian! provided. Thank you and I confirm that it works. Janusz
  28. 1 point
    If anyone needs the solution, run this mysql query: UPDATE tblinvoices SET taxrate=9,tax=subtotal*0.09,total=subtotal+tax-credit WHERE status='Unpaid' AND tax=0;
  29. 1 point
    Hello omega1 I am not entirely sure if this covers what you wish to do. But if you visit System Settings and then Administrator Roles & Permissions edit the group in mind and deselect the required Email Messages at the bottom of the page. Maybe setup a new group so that it doesn't stop emails from being sent to others admins if they are to continue receiving such emails.
  30. 1 point
    you should be able to hide the dropdown with CSS... label[for="inputPriority"], #inputPriority {display:none;} if that doesn't work, editing the template and removing the block that displays the Priority text and dropdown certainly will.
  31. 1 point
    The one I use won't work for most people because it uses PHPMailer with SMTP, but here's a simple version using the PHP mail() function: <?php /* This script is designed to keep the table tbllog_register in WHMCS from getting huge from creating a record every five minutes when cron runs. Fill out the database variables for your WHMCS installation and the $to email address where you want the script to send you notices. I recommend naming the script "clean_whmcs_logs.php" and putting it in a folder outside of your /public_html folder, then giving it 600 permissions since it will contain a database username and password as well as an email address. If you name it as above you can run the script in cron once a week with the command: php -q /<path to your scripts folder>/clean_whmcs_logs.php >/dev/null 2>&1 The script will send you an email if there is a connection problem, and on completion. */ // ******************************** DATABASE VARIABLES ********************************************* $host = 'localhost'; $dbname = ''; // The name of your WHMCS database. $dbuser = ''; // The username for your WHMCS database. Only DELETE capability is necessary for this script. $dbpass = ''; // The password for your WHMCS database user. // ***************************** END DATABASE VARIABLES ******************************************* // ******************************* EMAIL SETTING(S) ************************************************* $to = ''; // The email address where you want notices sent. // ***************************** END EMAIL SETTINGS ************************************************ function MailNotice($subject, $message) { global $to; $message = wordwrap($message, 70, "\r\n"); if (!mail($to, $subject, $message)) { error_log('The script clean_whmcs_logs.php was unable to send a notice email: ' . $message); } } // Set the cutoff date for selecting/deleting records to two weeks ago. $date = date('Y-m-d', strtotime('-2 weeks')); // Delete the records prior to the $date. $sql = "DELETE FROM tbllog_register WHERE created_at < :date"; try { $dbh = new PDO('mysql:host=' . $host . ';dbname=' . $dbname, $dbuser, $dbpass); $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $sth = $dbh->prepare($sql); $sth->bindParam(':date', $date); $sth->execute(); $deleted = $sth->rowCount(); MailNotice('Clean WHMCS Logs Notice', 'Clean WHMCS Logs ran successfully, deleting ' . $deleted . ' records.'); } catch(PDOException $e) { MailNotice('PDO Error on Line 52', $e->getMessage() . ' with sql = ' . $sql); } ?> clean_whmcs_logs.php
  32. 1 point
    Also I recommend going to setup > products/services > edit each category and ensure both gateways are available as you can limit gateways per category.
  33. -1 points
    Hello, We currently do not have any way to disable WHMCS built in support functionality. However, if you have no departments, it will not be possible for customers to submit tickets. You can modify your templates to remove all references to support. Relevant documentation on removing links can be located at https://docs.whmcs.com/Client_Area_Sidebars_Cheatsheet and https://docs.whmcs.com/Client_Area_Navigation_Menus_Cheatsheet
  34. -1 points
    From all of us here at WHMCS, we wish you a holiday season filled with joy and happiness! We hope that this year your celebrations can return to normal and will be spent with friends and family. It has been a pleasure to provide the software that helps run and grow your business this year, and we wish you all the best for the New Year ahead! A Quick Note on Holiday HoursWe know that despite the holidays, business doesn't stop and so the WHMCS support team will be available for urgent issues...View the full blog post
  35. -1 points
    Why don't you use a nulled payment gateway? Payment type says whatever u want like No Payment Required
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated