You are here

function commerce_braintree_module_implements_alter in Commerce Braintree 7

Implements hook_module_implements_alter().

The hook_form_alter used in commerce_cardonfile is not adapted to a token payment gateway. We need to remove the implementations of cardonfile form_alter and use our own alter.

Parameters

$implementations:

$hook:

File

./commerce_braintree.module, line 422
Implementations of the Braintree payment gateway (http://braintreepayments.com) for drupal commerce.

Code

function commerce_braintree_module_implements_alter(&$implementations, $hook) {
  if ($hook == 'form_alter' && isset($implementations['commerce_cardonfile'])) {
    $group = $implementations['commerce_cardonfile'];
    unset($implementations['commerce_cardonfile']);
  }
}