I just need to change one string which is hardcoded (this was surprise for me) in
vendor/magento/module-catalog/Controller/Adminhtml/Product/Attribute/Save.php
,
in execute()
method:
$this->messageManager->addSuccess(__('You saved the product attribute.'));
I must change 'You saved the product attribute.'
to another text with plugins/rewrites. As far as I know, the plugin can change only arguments' values or return value. If I will use extending the class, I can just overwrite the method, but then I have to copy-paste all the method's code.
Is there a better way to change this one string?
You saved the product attribute
?