zomex Posted Sunday at 10:28 PM Share Posted Sunday at 10:28 PM 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 Monday at 12:04 PM Share Posted Monday at 12:04 PM 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 Monday at 01:12 PM Author Share Posted Monday at 01:12 PM 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 Wednesday at 11:42 PM Administrators Share Posted Wednesday at 11:42 PM 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 Thursday at 07:20 PM Author Share Posted Thursday at 07:20 PM 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 16 hours ago Administrators Share Posted 16 hours ago 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...
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.