eugene-petrov / magento2-plugin
Magento 2 plugin example
Package info
github.com/eugene-petrov/magento2-plugin
Type:magento2-module
pkg:composer/eugene-petrov/magento2-plugin
Requires
- php: ^7.2.0
This package is auto-updated.
Last update: 2026-03-21 22:23:44 UTC
README
Snippet_Plugin
Problem: you need to change any (almost any) public method.
Here you can find more about plugins.
To enable this module execute:
php bin/magento --clear-static-content module:enable Snippet_Pluginphp bin/magento setup:upgrade
Snippet\Plugin\Plugin\Frontend\ModifyHeader file is an example of around and after plugins. 'Around' does nothing. While 'after' wraps into parentheses welcome message like this:
(Default welcome msg!)
Snippet\Plugin\Plugin\Frontend\ModifyBreadcrumbs file is an example of 'before' option. E.g. on detail product page breadcrumbs will look like this:
(Home) > (Test Product)