Skip to content

Instantly share code, notes, and snippets.

@kreamweb
Created May 23, 2018 13:15
Show Gist options
  • Select an option

  • Save kreamweb/c4eb323de5dd179cfc1f9f2c214f9839 to your computer and use it in GitHub Desktop.

Select an option

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