Hi,
I'm copying file
from "vendor/magento/module-sales/Model/Order/Pdf/Invoice.php"
to "app/code/Magento/Sales/Model/Order/Pdf/Invoice.php"
and editing this invoice but the function is still calling from vendor module.
How can I make this to work from app/code.
Please let me know.
Hello @gkarthick87
As per my guess it's because of your module name, because you are using namespace in custom module as
namespace Magento\Sales\Model\Order\Pdf;
which might pick the core class so it will be good if you change your module/vendor name.
and assuming that you've added preference in di.xml.
hope it helps.
Change module name and correct namespace properly will help you.
@gkarthick87 mythdhr wrote:Hi,
I'm copying file
from "vendor/magento/module-sales/Model/Order/Pdf/Invoice.php"
to "app/code/Magento/Sales/Model/Order/Pdf/Invoice.php"
and editing this invoice but the function is still calling from vendor module.
How can I make this to work from app/code.
Please let me know.
Mine is doing the same. Wish they would fix the problem.