How to alter commerce checkout form in a custom module? I'm using commerce and want to alter the checkout form in a custom module to prepopulate certain fields and hide them.

However, I'm not able to do this using hook_form_alter() as well as hook_commerce_checkout_pane_alter().

Here's my sample code:

function MYMODULE_form_alter($form, &amp;$form_state, $form_id) {
  global $user;

  switch ($form_id) {
    case 'commerce_checkout_form_checkout':
      // Rename the button for example.
      $form['buttons']['continue']['#value'] = t('Overridden value');
      break;
  }
}


How can I edit fields that are displayed on checkout?
Is there some other hook I should use?

Thanks!
I think you're looking for commerce_checkout_form() (commerce_checkout_form_checkout doesn't exist as far as I can tell from greping Commerce's code):

function MYMODULE_form_commerce_checkout_form_alter($form, &amp;$form_state, $form_id) {
  ...
}


or

function MYMODULE_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  switch ($form_id) {
    case 'commerce_checkout_form':
      ...
    break;
}