Created
March 26, 2018 09:15
-
-
Save patrickposner/66048e886270f29e45301b88c76ae1b4 to your computer and use it in GitHub Desktop.
conditional payment method
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
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