I have to override 2 controller 1 override is working and 1 override not working
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="\Magento\Customer\Controller\Account\ForgotPassword" type="\Copper\Customer\Controller\Auth\ForgotPassword" />
<preference for="\Magento\Customer\Controller\Account\ForgotPasswordPost" type="\Copper\Customer\Controller\Auth\ForgotPasswordPost" />
</config>
While \Magento\Customer\Controller\Account\ForgotPassword
override is working just fine. \Magento\Customer\Controller\Account\ForgotPasswordPost
is not overriding
Do anyone know Why ?
Controller ForgotPasswordPost.php
<?php
namespace Copper\Customer\Controller\Auth;
class ForgotPasswordPost extends \Magento\Customer\Controller\Account\ForgotPasswordPost
{
public function execute()
{
echo "hello";die();
}
}