A developer found a bug inside a private method of a third party module class. How can the developer override the method?
Select an option, then click Submit answer.
-
○
Create a custom class with the corrected logic, and define the class as a preference for original one in the di.xml
-
○
Create a custom class with corrected logic, and define the class as preference in the preferences.xml.
-
○
Create a plugin, implement correct logic in the 'after' method, and then define the plugin in the di.xml.