Skip to content

Instantly share code, notes, and snippets.

@DevinWalker
Created January 14, 2016 02:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DevinWalker/d075d2c2fb040941608c to your computer and use it in GitHub Desktop.
Save DevinWalker/d075d2c2fb040941608c to your computer and use it in GitHub Desktop.
Call the Gateway by it's name; primarily used for testing purposes
/**
* Call Give Payment Gateways by Name
*
* @param $gateways
*
* @return mixed
*/
function gr_override_gateway_labels( $gateways ) {
$gateways['authorize']['checkout_label'] = 'Authorize';
$gateways['stripe']['checkout_label'] = 'Stripe';
$gateways['paypalpro']['checkout_label'] = 'PayPal Pro';
$gateways['wepay']['checkout_label'] = 'WePay';
return $gateways;
}
add_filter( 'give_payment_gateways', 'gr_override_gateway_labels' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment