You are here

function uc_paypal_update_7001 in Ubercart 7.3

Fix incorrect order status configuration.

File

payment/uc_paypal/uc_paypal.install, line 166
Install, update and uninstall functions for the uc_paypal module.

Code

function uc_paypal_update_7001() {
  db_delete('uc_order_statuses')
    ->condition('order_status_id', '')
    ->execute();
  db_merge('uc_order_statuses')
    ->key(array(
    'order_status_id' => 'paypal_pending',
  ))
    ->insertFields(array(
    'order_status_id' => 'paypal_pending',
    'title' => t('PayPal pending'),
    'state' => 'payment_received',
    'weight' => 7,
    'locked' => 1,
  ))
    ->updateFields(array(
    'state' => 'payment_received',
    'locked' => 1,
  ))
    ->execute();
}