function _uc_coupon_is_checkout_order in Ubercart Discount Coupons 7.3
Same name and namespace in other branches
- 7.2 uc_coupon.module \_uc_coupon_is_checkout_order()
Check whether an order is the order being checked out by the current user.
Parameters
$order:
2 calls to _uc_coupon_is_checkout_order()
- uc_coupon_condition_order_has_coupon in ./
uc_coupon.rules.inc - Check if an order has a coupon applied.
- uc_coupon_uc_order in ./
uc_coupon.module - Implements hook_uc_order().
File
- ./
uc_coupon.module, line 2101 - Provides discount codes and gift certificates for Ubercart.
Code
function _uc_coupon_is_checkout_order($order) {
global $user;
return isset($_SESSION['cart_order']) && isset($order->order_id) && $order->order_id == $_SESSION['cart_order'] && uc_order_status_data($order->order_status, 'state') == 'in_checkout' && $user->uid == $order->uid;
}