You are here

function hook_payment_method_controller_info_alter in Payment 7

Alters payment method controllers.

Parameters

array $controllers_info: Keys are payment controller aliases, values are actual payment method controller class names.

1 invocation of hook_payment_method_controller_info_alter()
payment_method_controllers_info in ./payment.module
Returns information about payment method controllers.

File

./payment.api.php, line 62
Hook documentation.

Code

function hook_payment_method_controller_info_alter(array &$controllers_info) {

  // Remvove a payment method controller.
  unset($controllers_info['FooPaymentMethodController']);

  // Replace PaymentMethodControllerUnavailable with another controller.
  $controllers_info['PaymentMethodControllerUnavailable'] = 'FooPaymentMethodControllerUnavailableAdvanced';
}