function uc_extra_fields_pane_order_pane_alter in Extra Fields Checkout Pane 6.2
Implementation of hook_order_pane_alter(). Alters delivery and billing pane
Parameters
array $panes:
Return value
void
File
- ./
uc_extra_fields_pane.module, line 390 - Module: uc_extra_fields_pane.module
Code
function uc_extra_fields_pane_order_pane_alter(&$panes) {
foreach ($panes as $key => $pane) {
switch ($pane['id']) {
case 'ship_to':
if (uc_addresses_version() !== 2) {
$panes[$key]['callback'] = 'uc_extra_fields_pane_order_handler_delivery';
}
break;
case 'bill_to':
if (uc_addresses_version() !== 2) {
$panes[$key]['callback'] = 'uc_extra_fields_pane_order_handler_billing';
}
break;
case 'extra_delivery':
case 'extra_billing':
// If this method is called, the Ubercart version is at least 6.x-2.6.
// In this version the separate order address panes are no longer needed
// and thats why they will be deleted here.
unset($panes[$key]);
break;
}
}
}