zomex Posted December 21, 2025 Share Posted December 21, 2025 Hello all, The code sample in v9 is not working for me: https://developers.whmcs.com/themes/php/ Is it just me or is the no longer the supported way in v9? 0 Quote Link to comment Share on other sites More sharing options...
leemahoney3 Posted December 22, 2025 Share Posted December 22, 2025 Doesn't look like it, https://docs.whmcs.com/releases/9-0/9-0-release-notes/#smarty-php-tags 0 Quote Link to comment Share on other sites More sharing options...
zomex Posted December 22, 2025 Author Share Posted December 22, 2025 1 hour ago, leemahoney3 said: Doesn't look like it, https://docs.whmcs.com/releases/9-0/9-0-release-notes/#smarty-php-tags I believe this is referring to: {php}, {include_php}, or {insert} 0 Quote Link to comment Share on other sites More sharing options...
Administrators WHMCS John Posted December 24, 2025 Administrators Share Posted December 24, 2025 Hi @zomex, As part of the upgrade to the Smarty template engine in WHMCS v9.0, the legacy variable $template is no longer available and template_object is not exposed. The note on the documentation page will be updated to reflect this. We have recommend that all custom PHP logic be performed via hooks since WHMCS v6, and the example on this page works in 9.0 too. 0 Quote Link to comment Share on other sites More sharing options...
zomex Posted December 25, 2025 Author Share Posted December 25, 2025 19 hours ago, WHMCS John said: Hi @zomex, As part of the upgrade to the Smarty template engine in WHMCS v9.0, the legacy variable $template is no longer available and template_object is not exposed. The note on the documentation page will be updated to reflect this. We have recommend that all custom PHP logic be performed via hooks since WHMCS v6, and the example on this page works in 9.0 too. The hook doc I linked to in this thread was not working at the time of the v9 RC. The code was quietly updated, you are now implying that the code sample was working since v6 and now in v9 but the code was not working in v9 which is the reason I created this post. The quietly new updated code does now work in v9. 0 Quote Link to comment Share on other sites More sharing options...
Administrators WHMCS John Posted December 26, 2025 Administrators Share Posted December 26, 2025 Hi @zomex, I'm pleased to hear you were able to get the example code working. I can confirm from the page history, that at the time of writing, the example code on the page has not changed since 2016. 0 Quote Link to comment Share on other sites More sharing options...
twhiting9275 Posted Tuesday at 01:52 AM Share Posted Tuesday at 01:52 AM On 12/24/2025 at 5:42 PM, WHMCS John said: We have recommend that all custom PHP logic be performed via hooks since WHMCS v6, and the example on this page works in 9.0 too. Great, then give us the hook points to do so 😉 The reason we use variables like this is because WHMCS does not provide the necessary hook points to work with. Kind of silly to have to use those variables, but, again, sometimes it has to be done 0 Quote Link to comment Share on other sites More sharing options...
Administrators WHMCS John Posted Tuesday at 11:50 AM Administrators Share Posted Tuesday at 11:50 AM @twhiting9275, Sure thing, which ones do you need? 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.