ubercart: finding order id when admin is editing order
I found the answer after posting the question:  (Valid for Ubercart 7.36)

if (in_array('administrator', $user-&gt;roles)) {
dpm (" do fancy stuff");
dpm($_SESSION['ucga_order_id']);

$order_id = $_SESSION['ucga_order_id'];
 uc_order_comment_save($order_id, 0, t($admin_text), 'admin');

dpm ("end admin fancy");

}