I just want to inject an object into my plugin.
/* @var \Magento\Checkout\Model\Session */
protected $session;
public function __construct(\Magento\Checkout\Model\Session $session)
{
$this->session = $session;
}
For some reason, I get an error message:
Fatal error: Uncaught TypeError: Argument 1 passed to Company\Modul\Plugin\Checkout\LayoutProcessorPlugin::__construct() must be an instance of Magento\Checkout\Model\Session, none given, called in ...
I've deleted the generate directory, clear the cache, but I am still getting this error.
Why is it?