You are here

function uc_order_update_7007 in Ubercart 7.3

Add 'abandoned' order status.

File

uc_order/uc_order.install, line 858
Install, update and uninstall functions for the uc_order module.

Code

function uc_order_update_7007() {
  db_merge('uc_order_statuses')
    ->key(array(
    'order_status_id' => 'abandoned',
  ))
    ->fields(array(
    'title' => t('Abandoned'),
    'state' => 'canceled',
    'weight' => -30,
    'locked' => 1,
  ))
    ->execute();
  db_update('uc_orders')
    ->fields(array(
    'order_status' => 'abandoned',
  ))
    ->condition('order_status', 'in_checkout')
    ->condition('modified', REQUEST_TIME - 600, '<')
    ->execute();
}