Created
March 27, 2018 06:22
-
-
Save twern/f80d9aa3936dc4dd99b5b0bebeba1738 to your computer and use it in GitHub Desktop.
German Market - Zahlungsweise ab einen bestimmten Betrag
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
add_filter( 'woocommerce_available_payment_gateways', 'gm_conditional_payment', 1 ); | |
function gm_conditional_payment( $gateways ) { | |
global $woocommerce; | |
if ( $woocommerce->cart->total > 1000 ) { | |
unset( $gateways['german_market_purchase_on_account'] ); | |
} | |
return $gateways; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment