예제 #1
0
파일: Cron.php 프로젝트: jigoshop/Jigoshop2
 /**
  * Moves old orders to "On Hold" status.
  *
  * @internal
  */
 public function updatePendingOrders()
 {
     if ($this->options->get('advanced.automatic_reset')) {
         $orders = $this->orderService->findOldPending();
         foreach ($orders as $order) {
             $this->emailService->suppressNextEmail();
             /** @var $order \Jigoshop\Entity\Order */
             $order->setStatus(Status::ON_HOLD, __('Archived due to order being in pending state for a month or longer.', 'jigoshop'));
             $this->orderService->save($order);
         }
     }
 }
예제 #2
0
 /**
  * @return array List of orders that are too long in Pending status.
  */
 public function findOldPending()
 {
     return $this->service->findOldPending();
 }