You are here

function uc_cart_filter_checkout_panes in Ubercart 7.3

Same name and namespace in other branches
  1. 5 uc_cart/uc_cart.module \uc_cart_filter_checkout_panes()
  2. 6.2 uc_cart/uc_cart.module \uc_cart_filter_checkout_panes()

Removes panes from the list that match the given conditions.

Return value

array A checkout pane array with panes filtered out that have key values matching the combinations in the $remove array.

2 calls to uc_cart_filter_checkout_panes()
uc_cart_checkout_form in uc_cart/uc_cart.pages.inc
The checkout form built up from the enabled checkout panes.
uc_cart_checkout_review in uc_cart/uc_cart.pages.inc
Allows a customer to review their order before finally submitting it.

File

uc_cart/uc_cart.module, line 1356

Code

function uc_cart_filter_checkout_panes($panes, $remove) {
  foreach ($panes as $id => $pane) {
    foreach ($remove as $key => $value) {
      if (isset($panes[$id][$key]) && $panes[$id][$key] == $value) {
        unset($panes[$id]);
      }
    }
  }
  return $panes;
}