// Filter to change column name for the right "points account"
function FILTER_COUPON_CHANGE_POINTS_COLUMN_NAME ($data) {
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
- // Are the points locked?
- if (($data['locked'] === true) && (getConfig('coupon_locked_points_mode') == 'LOCKED')) {
- // Locked points may be routed to special account
- $data['column'] = 'locked_order_points';
- } elseif (getConfig('coupon_points_account') == 'ORDER') {
- // These points should be routed to 'order' account
- $data['column'] = 'order_points';
- } else {
- // Else all went to general account
- $data['column'] = 'points';
- }
+ // Get the column name from extension's name and 'locked'
+ $data['column'] = getPointsColumnNameFromExtensionNameLocked('coupon', $data['locked']);
// Return data
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');