1

I want to make changes on

vendor\magento\module-fedex\Model\Carrier.php

How do I override this core file? I just want this completely override. Like what folder I should create and what files I have to create, and what Magento command I need to run after all files was created.

Thanks in advance.

1 Answer 1

0

To override or re-writing the magento core or any other module class you have to create your own module and use "preferences". You can check this blog post for detail and understand how to write module to override core class. In this blog post , Below block is important to understand:

<preference for="Magento\Catalog\Helper\Product" type="FME\Test\Helper\Rewrite\Product" / >

Is main thing to understand, this part does the magic. Where tells magento which class "for" to override with what class "type".

Hope this will help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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