Skip to content

Instantly share code, notes, and snippets.

@twern
Created March 27, 2018 06:22
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 twern/f80d9aa3936dc4dd99b5b0bebeba1738 to your computer and use it in GitHub Desktop.
Save twern/f80d9aa3936dc4dd99b5b0bebeba1738 to your computer and use it in GitHub Desktop.
German Market - Zahlungsweise ab einen bestimmten Betrag
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