i just want to change some request params by using beforeExecute plugin so can i do same.... ?

etc/di.xml **

<type name="Magento\Customer\Controller\Account\CreatePassword">
    <plugin name="create_password_bug_fixed" type="Vendor\Base\Plugin\Account\CreatePassword" sortOrder="1"  />


CreatePassword.php(Plugin Class)

    namespace Vendor\Base\Plugin\Account;

class CreatePassword{
    public function beforeExecute(\Magento\Customer\Controller\Account\CreatePassword $subject){
        /*What need to write here for change attribute value like Token and id */



Try the following way:

$subject->getRequest()->setParam('existing_key', $newValue);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.