Created
October 1, 2014 12:58
-
-
Save NiklasHogefjord/0cdb1641d5c1b2479c5d to your computer and use it in GitHub Desktop.
WooCommerce, DIBS Payment Gateway - Filter the paytype sent to DIBS
This file contains 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
/** | |
* WooCommerce - DIBS payment gateway | |
* Filter the paytype sent to DIBS | |
* | |
**/ | |
add_filter('woocommerce_dibs_paytypes', 'myprefix_dibs_paytypes'); | |
function myprefix_dibs_paytypes( $paytypes ) { | |
// Multiple paytypes are added comma separated. | |
// See list of possible paytypes here: http://tech.dibspayment.com/toolbox/paytypes | |
$paytypes = 'LOPLUS'; | |
return $paytypes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hej Niklas!
Jag har en fråga, om jag nu vill ha fyra betalmetoder, exempelvis Visa, Mastercard, direktbankbetalning via Swedbank och Nordea, visst sakll min kod se ut så här:
/**
**/
add_filter('woocommerce_dibs_paytypes', 'myprefix_dibs_paytypes');
function myprefix_dibs_paytypes( $paytypes ) {
}
Och om det stämmer, vart skall jag då lägga in denna kod för att det skall funka? Jag provat lägga in den på function.php för mitt tema men det funkade inte, finns det någon annan plats den bör vara på?
Stort tack för hjälpen!