Please anyone tell me, how to call checkout session in module's controller?
this method doesn't work for me
<?php
namespace Demo\Demo\Controller\Demo;
class Demo extends \Magento\Framework\App\Action\Action
{
protected $_checkoutSession;
public function __construct(
\Magento\Checkout\Model\Session $checkoutSession
) {
$this->_checkoutSession = $checkoutSession;
}
public function execute()
{
var_dump($this->_checkoutSession);
}
}