You are here

function uc_stock_token_values in Ubercart 5

Same name and namespace in other branches
  1. 6.2 uc_stock/uc_stock.module \uc_stock_token_values()

Implementation of hook_token_values().

File

uc_stock/uc_stock.module, line 95

Code

function uc_stock_token_values($type, $object = NULL) {
  switch ($type) {
    case 'stock':
      $values['stock-level'] = $object->stock;
      $values['stock-model'] = $object->sku;
      $values['stock-threshold'] = $object->threshold;
      break;
  }
  return $values;
}