Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 46482

A template for creating new objects that describes the common state(s) and behavior(s). NOT TO BE CONFUSED WITH CSS CLASSES. Use [css] instead.

0 votes
1 answer
5k views

How to override a method in Magento 2

I would like to override a method of a class, but it does not work. The changes added to the method are not used. File \Magento\Sales\Model\Order\Email\Sender.php <? … Magento\Sales\Model\Order; use Magento\Sales\Model\Order\Email\Container\IdentityInterface; use Magento\Sales\Model\Order\Email\Container\Template; use Magento\Sales\Model\Order\Address\Renderer; /** * Class
Reshad Zazai's user avatar
1 vote
Accepted

How to override a method in Magento 2

I have studied more about the above problem and found out that instead of extending Sender class (Magento\Sales\Model\Order\Email\Sender), I have to extend OrderSender class (Magento\Sales\Model\Order\ … My new class MyVendor\MyModule\Model\Order\Email\Sender\OrderSender.php <? …
Reshad Zazai's user avatar