Why is it not recommended to modify the Magento 2 core files?
I'm guessing that when Magento 2 updates it replaces those modified files with the new files so it would be a best practice to create a extension/plugin instead?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
Definitively, in any framework it is a bad idea to modify core files. There is almost always some way to override native code. There are many reasons, the two main being: