Skip to content

Instantly share code, notes, and snippets.

@kreamweb
Created May 23, 2018 13:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kreamweb/c4eb323de5dd179cfc1f9f2c214f9839 to your computer and use it in GitHub Desktop.
Save kreamweb/c4eb323de5dd179cfc1f9f2c214f9839 to your computer and use it in GitHub Desktop.
<?php
add_filter('ywpar_calculate_rewards_discount_max_discount_fixed','ywpar_calculate_rewards_discount_max_discount_fixed', 10, 1);
function ywpar_calculate_rewards_discount_max_discount_fixed( $subtotal ){
return floatval( WC()->cart->get_total('edit') );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment