How can I change the text on my customer's invoice " Surcharge fee " on Magento 2

enter image description here


2 Answers 2


Seems like that are the values of the product name and the SKU of this one. So you can just change these value for the respective product on the admin panel.

  • Hi Rafael The Surcharge fee is our creditcard / paypal fee. After i activated Surcharge fee under Creditcard payment. Commented May 16, 2017 at 18:51
  • So seems like this payment third-party module adds the fee like a product. Commented May 16, 2017 at 18:58
  • How can i change the text do you know that ? Commented May 16, 2017 at 19:00
  • Maybe there are options to change the name using the admin panel if there's not you can try to find the code for this name to change this one. Commented May 16, 2017 at 19:09
  • Hi again Do you know where i can find this code? Commented May 16, 2017 at 19:19

use egrep -r "Surcharge fee" path/of/your/third/party/extension to find where they create the "surcharge" product then rename it.

This is a Linux command that go through your files to find lines that match the key words. Normally you can use it if you have GIT bash installed in you windows computer. If you are using a Linux system or mac, then you can use it directly in the terminal.

Example: egrep -r "swatch_visual" source/vendor/magento/module-swatches/


source/vendor/magento/module-swatches/Controller/Adminhtml/Product/Attribute/Plugin/Save.php:                case 'swatch_visual':
source/vendor/magento/module-swatches/etc/adminhtml/di.xml:                <item name="swatch_visual" xsi:type="string">optionvisual</item>
source/vendor/magento/module-swatches/etc/config.xml:                    <swatch_visual>swatch_visual</swatch_visual>
  • Hi Tomy Thank you very much for your help! Can you please tell me where i should use se egrep -r ? Commented May 17, 2017 at 6:41

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.