Skip to content

Instantly share code, notes, and snippets.

@WildCoders
Created May 1, 2018 16:39
Show Gist options
  • Save WildCoders/23f9f57ab532c0144515fc87b8c5a42d to your computer and use it in GitHub Desktop.
Save WildCoders/23f9f57ab532c0144515fc87b8c5a42d to your computer and use it in GitHub Desktop.
WooCommerce Category Discount - Modify discount amount in Checkout
<?php
function wcd_disc_amt_checkout_details_func($disc_amt, $item, $cart_item_key, $values, $order){
return $disc_amt * $values['quantity'];
}
add_filter('wcd_disc_amt_checkout_details', 'wcd_disc_amt_checkout_details_func', 10, 5);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment