Create a new plugin in Magento 2

The plugins (also known as Interceptor) is a class that modify the behavior of public class by intercepting the function call and running code before, after or with (around) function call. By creating the plugin we create substitute or extend the functionality of existing functionality (the same that we were doing in magento 1 rewrite).(…)