public function __construct(Wordpress $wp, Factory $factory, Options $options, SessionServiceInterface $sessionService) { $this->wp = $wp; $this->factory = $factory; $this->options = $options; $this->session = $sessionService->get($sessionService->getCurrentKey()); }
public function __construct(Wordpress $wp, SessionServiceInterface $sessionService) { $this->session = $sessionService->get($sessionService->getCurrentKey()); if ($this->session->getField(self::NOTICES)) { $this->notices = $this->session->getField(self::NOTICES); } if ($this->session->getField(self::WARNINGS)) { $this->warnings = $this->session->getField(self::WARNINGS); } if ($this->session->getField(self::ERRORS)) { $this->errors = $this->session->getField(self::ERRORS); } $wp->addAction('shutdown', array($this, 'preserveMessages'), 9); }
public function __construct(Wordpress $wp, Options $options, CustomerServiceInterface $customerService, ProductServiceInterface $productService, ShippingServiceInterface $shippingService, SessionServiceInterface $sessionService, PaymentServiceInterface $paymentService, OrderFactory $orderFactory) { $this->wp = $wp; $this->options = $options; $this->customerService = $customerService; $this->productService = $productService; $this->shippingService = $shippingService; $this->session = $sessionService->get($sessionService->getCurrentKey()); $this->paymentService = $paymentService; $this->orderFactory = $orderFactory; if ($this->session->getField(self::CART) == '') { $this->session->setField(self::CART, array()); } $this->currentUserCartId = $this->generateCartId(); }
public function __construct(Wordpress $wp, SessionServiceInterface $sessionService) { $this->wp = $wp; $this->session = $sessionService->get($sessionService->getCurrentKey()); }