Skip to content

Instantly share code, notes, and snippets.

@malsubrata
Last active May 10, 2018 09:39
Show Gist options
  • Save malsubrata/89fc741b32adc7fab7d355319465856f to your computer and use it in GitHub Desktop.
Save malsubrata/89fc741b32adc7fab7d355319465856f to your computer and use it in GitHub Desktop.
Restrict cashback for COD payment method
add_filter('process_woo_wallet_general_cashback', 'process_woo_wallet_general_cashback_callback', 10, 2);
function woo_wallet_general_cashback_amount($precess, $order){
if('cod' === $order->get_payment_method('edit')){
return false;
}
return $precess;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment