Magento 2 – Get Custom Variables
You may have recently wondered how to get a specific custom variable in Magento 2. The old way of doing this in Magento 1 looked similar to this. In Magento 2 we need to add the correct class to our constructor. Then in our custom function, we can get the values of our custom variable like so.…