<?php
uc_order_state_default($state_id)
?>Description:
Store administrators may select a default order status for each order state. For the most part, they'll probably never use something other than the defaults provided with Ubercart. However, just in case they do, you should always use this function when advancing an order to a new order state (like from in_checkout to post_checkout as specified in the cart module for completed checkouts).
Parameters:
- $state_id - the order state whose default status you want to find.
Return value:
A string containing the default order status ID for the specified state.
Example:
<?php
// From the function uc_cart_complete_sale() in uc_cart.module.
// Move an order's status from "In Checkout" to "Pending"
if (uc_order_status_data($order->order_status, 'state') == 'in_checkout') {
uc_order_update_status($order->order_id, uc_order_state_default('post_checkout'));
}
?>