? panes-alter-1.patch
Index: docs/hooks.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ubercart/docs/hooks.php,v
retrieving revision 1.1.2.19
diff -u -p -r1.1.2.19 hooks.php
--- docs/hooks.php	23 Sep 2009 15:45:55 -0000	1.1.2.19
+++ docs/hooks.php	13 Oct 2009 13:15:12 -0000
@@ -374,6 +374,24 @@ function hook_checkout_pane() {
 }
 
 /**
+ * Alter panes definition.
+ *
+ * @param $panes
+ *   Array with the panes information as defined in hook_checkout_pane(), passed
+ *   by reference.
+ */
+function hook_checkout_pane_alter(&$panes) {
+  foreach ($panes as &$pane) {
+    if ($pane['id'] == 'cart') {
+      $pane['callback'] = 'my_custom_module_callback';
+    }
+  }
+}
+
+
+
+
+/**
  * Give clearance to a user to download a file.
  *
  * By default the uc_file module can implement 3 restrictions on downloads: by
Index: uc_cart/uc_cart_checkout_pane.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ubercart/uc_cart/uc_cart_checkout_pane.inc,v
retrieving revision 1.5.2.10
diff -u -p -r1.5.2.10 uc_cart_checkout_pane.inc
--- uc_cart/uc_cart_checkout_pane.inc	17 Aug 2009 21:27:55 -0000	1.5.2.10
+++ uc_cart/uc_cart_checkout_pane.inc	13 Oct 2009 13:15:13 -0000
@@ -532,6 +532,9 @@ function _checkout_pane_list($action = N
   }
 
   $panes = module_invoke_all('checkout_pane', NULL);
+  // Allow other modules to alter the panes.
+  drupal_alter('checkout_pane', $panes);
+
   foreach ($panes as $i => $value) {
     $panes[$i]['enabled'] = variable_get('uc_pane_'. $panes[$i]['id'] .'_enabled', (!isset($panes[$i]['enabled']) ? TRUE : $panes[$i]['enabled']));
     $panes[$i]['weight'] = variable_get('uc_pane_'. $panes[$i]['id'] .'_weight', (!isset($panes[$i]['weight']) ? 0 : $panes[$i]['weight']));
