You are here

function uc_stock_token_values in Ubercart 6.2

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

Implements hook_token_values().

File

uc_stock/uc_stock.module, line 182

Code

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