I want to remove shipping charge and credit card type and credit card number from order invoice.
please check image:
I have overridden this core file
vendor/magento/module-sales/Model/Order/Pdf/Invoice.php
this file working fine.
But while overridding this file
vendor/magento/module-sales/Model/Order/Pdf/AbstractPdf.php
I am not able to get any update of this file. I have commented some code from this file but not got any change.
Best Answer
Try creating same methods which you want to override from AbstractPdf.php in your overided Invoice.php file. For example:
1) Create a preference for Invoice.php in di.xml
2) In Vendor\Module\Model\Order\Pdf\Invoice, in you case create a method insertOrder