Index: docs/hooks.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ubercart/docs/Attic/hooks.php,v
retrieving revision 1.1.2.24
diff -u -p -r1.1.2.24 hooks.php
--- docs/hooks.php	16 Jul 2010 15:45:09 -0000	1.1.2.24
+++ docs/hooks.php	14 Nov 2010 18:10:00 -0000
@@ -843,6 +843,21 @@ function hook_order_pane() {
 }
 
 /**
+ * Alter order pane definitions.
+ *
+ * @param $panes
+ *   Array with the panes information as defined in hook_order_pane(), passed
+ *   by reference.
+ */
+function hook_order_pane_alter(&$panes) {
+  foreach ($panes as &$pane) {
+    if ($pane['id'] == 'payment') {
+      $pane['callback'] = 'my_custom_module_callback';
+    }
+  }
+}
+
+/**
  * Allows modules to alter ordered products when they're loaded with an order.
  *
  * @param &$product
Index: uc_order/uc_order.order_pane.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ubercart/uc_order/uc_order.order_pane.inc,v
retrieving revision 1.1.2.23
diff -u -p -r1.1.2.23 uc_order.order_pane.inc
--- uc_order/uc_order.order_pane.inc	25 Oct 2010 17:41:30 -0000	1.1.2.23
+++ uc_order/uc_order.order_pane.inc	14 Nov 2010 18:10:12 -0000
@@ -1072,6 +1072,15 @@ function _order_pane_list($view = 'view'
     $panes[$i]['enabled'] = variable_get('uc_order_pane_'. $panes[$i]['id'] .'_enabled', (!isset($panes[$i]['enabled']) ? TRUE : $panes[$i]['enabled']));
     $panes[$i]['weight'] = variable_get('uc_order_pane_'. $panes[$i]['id'] .'_weight_'. $view, (!isset($panes[$i]['weight']) ? 0 : $panes[$i]['weight']));
   }
+
+  // Allow other modules to alter the panes.
+  drupal_alter('order_pane', $panes);
+
+  // Make sure that all the required attributes are set
+  foreach ($panes as $i => $value) {
+    $panes[$i]['enabled'] = !isset($panes[$i]['enabled']) ? TRUE : $panes[$i]['enabled'];
+    $panes[$i]['weight'] = !isset($panes[$i]['weight']) ? 0 : $panes[$i]['weight'];
+  }
   usort($panes, 'uc_weight_sort');
 
   return $panes;
