How to get getUrl() In Plugin Or Observer File In Magento 2
The default Magento 2 does not allow to call $this->getUrl() method in the plugin or observer file. However, web developers, have faced the scenarios where we need to go out of our way to fulfill the crazy client requirements! You have to pass dependency as Magento\Framework\UrlInterface to construct() method when you require to call getUrl() […]