I have this custom configuration in my system.xml
:
<system>
<section id="general">
<group id="store_information">
<field id="support_phone" translate="label" type="text" sortOrder="21" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Support Phone Number</label>
</field>
</group>
</section>
</system>
And I want to use this in my e-mail templates. So naturally, I try something like:
{{config path="general/store_information/support_phone"}}
Now this doesn't render the variable. which makes sense. This was also a security issue in Magento 1 since it would allow you to peek into system configuration settings, like API keys and stuff. So I have to include these parameters. Now I've added to my di.xml
the setting to the config exclude list and the source model used by the email module:
<type name="Magento\Config\Model\Config\Export\ExcludeList">
<arguments>
<argument name="configs" xsi:type="array">
<item name="general/store_information/support_phone" xsi:type="string">1</item>
</argument>
</arguments>
</type>
<type name="Magento\Email\Model\Source\Variables">
<plugin name="custom_plugin" type="Vendor\Module\Plugin\Magento\Email\Model\Source\Variables"/>
</type>
But still it doesn't work. So where is the setting so I can whitelist certain configuration settings to be used in e-mail templates?