Guides & TutorialsTroubleshootingTroubleshooting CustomizationsEliminating Legacy Smarty Tags in WHMCS 8.7+

Eliminating Legacy Smarty Tags in WHMCS 8.7+

In previous WHMCS versions, Smarty 3's SmartyBC provided backwards compatibility for Smarty's {php}, {include_php}, and {insert} tags. To promote better security, we plan to move to Smarty 4, which is not compatible with SmartyBC, in the near future.

We will remove support for legacy Smarty tags in WHMCS 9.0.

If your customizations include legacy Smarty tags, you must perform the actions below to find and remove them.

For more information about these changes, see Eliminating Legacy Smarty Tags.

Eliminate Legacy Smarty Tag Use on Your Installation

Before upgrading to WHMCS 9.0, you must remove legacy Smarty tags from all of your customizations and disable the related Allow Smarty PHP Tags setting.

To do this, perform the following steps on WHMCS 8.7 or later:

  1. Go to Reports > Reports.
  2. Click Smarty Compatibility at the bottom of the page.

If the system detects any legacy Smarty tags in your customizations, the report will list them.

3. For each item under Template Files, use your preferred method to edit each file to remove all legacy Smarty tags.

4. For each item under Email Templates, click the template name to edit the email template in the editor at Configuration > System Settings > Email Templates.

For examples of removing the most common legacy Smarty tag uses, see Replacing Legacy Smarty Tags with Hooks.

5. When you have finished editing each item in the report, click Rescan Now to ensure that there are no remaining legacy Smarty tags.

6. When scanning no longer finds any legacy Smarty tags, go to the Security tab at Configuration > System Settings > General Settings.

7. Select Disabled for Allow Smarty PHP Tags.

8. Click Save.

9. Go to Configuration > System Health to ensure that no legacy Smarty tag warnings display. If any warnings do display, repeat the steps above to ensure that you have removed all tags from your system.