Alright, I had searched for the old functions and made the changes, but there were two queries in uc_credit_cron() that needed to be updated, too. The function should resemble this:
<?php
function uc_credit_cron() {
// Empty anonymous carts.
$time = strtotime(variable_get('uc_cart_anon_duration', '4') .' '
. variable_get('uc_cart_anon_unit', 'hours') .' ago');
db_query("DELETE upc.* FROM {uc_orders} AS uo LEFT JOIN {uc_payment_credit} "
."AS upc ON uo.order_id = upc.order_id WHERE uo.modified <= %d AND "
."uo.order_status = '%s'", $time, uc_order_state_default('in_checkout'));
// Mask old stored credit card numbers.
$time = strtotime(variable_get('uc_credit_number_duration', '1') .' '
. variable_get('uc_credit_number_unit', 'years') .' ago');
db_query("UPDATE {uc_orders} AS uo LEFT JOIN {uc_payment_credit} AS upc "
."ON uo.order_id = upc.order_id SET upc.cc_number = "
."RIGHT(upc.cc_number, 4), upc.cc_cvv = '000' WHERE uo.modified "
."<= %d AND uo.order_status = '%s' AND CHAR_LENGTH(upc.cc_number) > 4",
$time, variable_get('uc_credit_clear_status', uc_order_state_default('completed')));
}
?>Changes are in Bazaar.



Joined: 08/07/2007