Skip to content

Instantly share code, notes, and snippets.

@malsubrata
Created January 9, 2019 06:36
Show Gist options
  • Save malsubrata/6ffca4cccbe8869abb5459cbcbfd81e8 to your computer and use it in GitHub Desktop.
Save malsubrata/6ffca4cccbe8869abb5459cbcbfd81e8 to your computer and use it in GitHub Desktop.
Disable bank transfer if partial payment enabled
add_filter('woocommerce_available_payment_gateways', 'woocommerce_available_payment_gateways_callback');
if(!function_exists('woocommerce_available_payment_gateways_callback')){
function woocommerce_available_payment_gateways_callback($_available_gateways){
if(isset($_available_gateways[ 'bacs' ]) && is_enable_wallet_partial_payment()){
unset($_available_gateways[ 'bacs' ]);
}
return $_available_gateways;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment