I used Plugin for this, But my plugin is not working.
Below is my code.
di.xml
<type name="Magento\Framework\View\Element\Html\Link\Current">
<plugin name="Current" type="CP\Coreoverride\Plugin\Current" />
</type>
Current.php
<?php
namespace CP\Coreoverride\Plugin;
class Current{
protected function _toHtml()
{
echo "fdsfds"; die;
}
}
Anyone can look into please.