0

I want to add one more method same like getUrl method in Vendor/Magento/module-email/Model/AbstractTemplate.php.

How can we override in magento2.1.12?

If I directly add a new method in Vendor/Magento/module-email/Model/AbstractTemplate.php, what is a problem?

0

Class override is not possible as AbstractTemplate is an abstract class. See more at https://magento.stackexchange.com/a/108058/4564

Also, working on original file Vendor/Magento/module-email/Model/AbstractTemplate.php is not a good idea because of when you upgrade Magento version that time that class will be replaced by the updated version of that file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.