Last active
January 10, 2020 03:49
-
-
Save mehul0810/353b00bad1a31330f5b3d1971ce841f4 to your computer and use it in GitHub Desktop.
This Gist is used to register custom payment gateway for Give.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Register payment method. | |
* | |
* @since 1.0.0 | |
* | |
* @param array $gateways List of registered gateways. | |
* | |
* @return array | |
*/ | |
function mg_register_payment_method( $gateways ) { | |
// Duplicate this section to add support for multiple payment method from a custom payment gateway. | |
$gateways['instamojo'] = array( | |
'admin_label' => __( 'Instamojo - Credit Card', 'give' ), // This label will be displayed under Give settings in admin. | |
'checkout_label' => __( 'Credit Card', 'give' ), // This label will be displayed on donation form in frontend. | |
); | |
return $gateways; | |
} | |
add_filter( 'give_payment_gateways', 'mg_register_payment_method' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment