uc_order_state_data

Function uc_order_state_data() in uc_order.module:
<?php
  uc_order_state_data
($state_id, $key)
?>

Description:

This function is used to return a piece of data from an order state array.

Parameters:
  • $state_id - the ID of the order state you want to get data from.
  • $key - the key in the state array whose value you want - id, title, weight, scope.
Return value:

The value of the key you specify.


Example:
<?php
 
// Put an order state's title in a form.
 
$form['order_statuses'][$status['id']]['state'] = array(
   
'#value' => uc_order_state_data($status['state'], 'title'),
  );
?>