10. Feb 2022 |

Create a Magento plugin

Name plugin classes after what they do rather than after their target class.

First create plugin class and then configure it in di.xml. Plugin “name” in di.xml is module name that it is located at.

Plugin classes are located in Plugin folder within respective module.

After plugins execute after the target method. As a second argument after methods take return value of the target method.

Leave a Reply

Your email address will not be published.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.