Skip navigation
Help

hook_uc_payment_method_checkout_alter

7 uc_payment.api.php hook_uc_payment_method_checkout_alter(&$methods, $order)

Alter payment methods available at checkout.

Parameters

$methods: Array of payment methods passed by reference. Keys are payment method IDs, strings are payment method titles.

$order: The order that is being checked out.

Related topics

1 function implements hook_uc_payment_method_checkout_alter()

1 invocation of hook_uc_payment_method_checkout_alter()

File

ubercart/payment/uc_payment/uc_payment.api.php, line 234
Hooks provided by the Payment module.

Code

function hook_uc_payment_method_checkout_alter(&$methods, $order) {
  // Remove the Check payment method for orders under $100.
  if ($order->order_total < 100) {
    unset($methods['check']);
  }
}