function uc_discounts_get_codes_for_order in Ubercart Discounts (Alternative) 7.2
Same name and namespace in other branches
- 6.2 uc_discounts/uc_discounts.module \uc_discounts_get_codes_for_order()
Returns discount order codes used by order ID.
Parameters
int $order_id:
Return value
array Array of discount order codes.
1 call to uc_discounts_get_codes_for_order()
- uc_discounts_uc_order in uc_discounts/
uc_discounts.module - Implements hook_uc_order().
File
- uc_discounts/
uc_discounts.module, line 2240
Code
function uc_discounts_get_codes_for_order($order_id) {
return uc_discounts_codes_to_array(db_query('SELECT codes FROM {uc_discounts_order_codes} WHERE order_id = :order_id', array(
':order_id' => $order_id,
))
->fetchField());
}