Skip to content

Instantly share code, notes, and snippets.

@WildCoders
Created May 1, 2018 16:38
Show Gist options
  • Save WildCoders/3e25321f35eb7fd9f573b25db4c9df5e to your computer and use it in GitHub Desktop.
Save WildCoders/3e25321f35eb7fd9f573b25db4c9df5e to your computer and use it in GitHub Desktop.
WooCommerce Category Discount - Modify discount amount in Cart Details
<?php
function wcd_disc_amt_cart_details_func($disc_amt, $data, $item){
return $disc_amt * $item['quantity'];
}
add_filter('wcd_disc_amt_cart_details', 'wcd_disc_amt_cart_details_func', 10, 3);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment