You are here

function commerce_stock_checkout_form_validate in Commerce Stock 7.2

Same name and namespace in other branches
  1. 7 commerce_stock.module \commerce_stock_checkout_form_validate()

Form validation handler for commerce_checkout_form_checkout().

Make sure all items in the cart are in stock before continuing. This should not be reached as this is now handled by the stock checkout pane, but as that can be disabled it may be safe to keep this extra check.

1 string reference to 'commerce_stock_checkout_form_validate'
commerce_stock_form_alter in ./commerce_stock.module
Implements hook_form_alter().

File

./commerce_stock.module, line 255
Commerce Stock module.

Code

function commerce_stock_checkout_form_validate($form, &$form_state) {
  $order_wrapper = entity_metadata_wrapper('commerce_order', $form_state['order']);
  commerce_stock_checkout_validate($order_wrapper);
}