You are here

function uc_order_can_delete in Ubercart 5

Same name and namespace in other branches
  1. 6.2 uc_order/uc_order.module \uc_order_can_delete()
  2. 7.3 uc_order/uc_order.module \uc_order_can_delete()

Return TRUE if an order can be deleted by the current user.

2 calls to uc_order_can_delete()
uc_order_delete_confirm_form in uc_order/uc_order.module
uc_order_edit_form in uc_order/uc_order.module

File

uc_order/uc_order.module, line 3221

Code

function uc_order_can_delete($order) {
  $can_delete = FALSE;
  foreach (uc_order_actions($order) as $action) {
    if ($action['name'] == t('Delete')) {
      $can_delete = TRUE;
    }
  }
  return $can_delete;
}