You are here

function commerce_braintree_form_commerce_checkout_form_payment_alter in Commerce Braintree 7.3

Same name and namespace in other branches
  1. 7.2 commerce_braintree.module \commerce_braintree_form_commerce_checkout_form_payment_alter()

Implements hook_form_FORM_ID_alter().

Alter the Payment checkout page to remove the default help text.

File

./commerce_braintree.module, line 536
Integrates Braintree Transparent Redirect with Drupal Commerce.

Code

function commerce_braintree_form_commerce_checkout_form_payment_alter(&$form, &$form_state) {
  if (!empty($form['commerce_payment']['payment_method']['#default_value']) && strpos($form['commerce_payment']['payment_method']['#default_value'], 'braintree_tr') === 0) {
    unset($form['help']);
  }
}