문제

I have one line of code in a core module (contact) in which I need to change. What is the correct way to make the change to change/overwrite this file?

도움이 되었습니까?

해결책

There are two ways to do that:

  1. You can use composer patches to change file (https://github.com/cweagans/composer-patches)
  2. Use around plugin to override specific public method on a class. (https://devdocs.magento.com/guides/v2.3/extension-dev-guide/plugins.html)

다른 팁

You can override using magento plugin concept or simply override concept using preferences

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top