Created
January 9, 2019 06:36
-
-
Save malsubrata/6ffca4cccbe8869abb5459cbcbfd81e8 to your computer and use it in GitHub Desktop.
Disable bank transfer if partial payment enabled
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', '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