You are here

function customer_profile_type_ui_pane_review in Customer Profile Type UI 7

Checkout pane callback: returns the cart contents review data for the Review checkout pane.

File

includes/customer_profile_type_ui.checkout_pane.inc, line 74
Checkout pane callback functions for the customer_profiles_type_ui module.

Code

function customer_profile_type_ui_pane_review($form, $form_state, $checkout_pane, &$order) {

  // Check to see if this pane should be disabled or not.
  if (_customer_profile_type_ui_disable_this_pane($checkout_pane['pane_id'], $order)) {
    return NULL;
  }

  // Pane is disabled so don't display it.
  // Not disabled so get original callback and call it.
  $original_panes = _customer_profile_type_ui_store_checkout_pane_contexts();
  if ($callback = commerce_checkout_pane_callback($original_panes[$checkout_pane['pane_id']], 'review')) {

    // return the cart contents review data using the original pane callback.
    return $callback($form, $form_state, $checkout_pane, $order);
  }
}