Attention! DO NOT USE ANSWER ABOVE. See my comment for an explanation.
Instead of the answer above ( which you NEVER use ), create a custom Ubercart (CA) conditional action and add it to the "Trigger: Client completes validation" section in your Ubercart CA workflow, found in https: //dev.betternow. org / admin / store / ca / ββoverview
Here I define a user CA
function my_module_ca_action() { $order_arg = array( '#entity' => 'uc_order', '#title' => t('Order'), ); $actions['my_module_status_update'] = array( '#title' => t('Some Title'), '#category' => t('Custom UC AC'), '#callback' => 'my_module_some_function_name', '#arguments' => array( 'order' => $order_arg, ), ); return $actions; }
Now I can use the order identifier in my own callback function defined in my module:
function my_module_some_function_name(&$order, $settings) { echo "This is the order id: " . $order->order_id; }
I myself use this approach to show the "Thank you" page to users with a link to the just purchased product.
source share