Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
add_filter('woocommerce_dynamic_pricing_is_cumulative', 'on_woocommerce_dynamic_pricing_is_cumulative', 10, 3);
function on_woocommerce_dynamic_pricing_is_cumulative($cumulative, $discounter_name, $cart_item) {
if ($discounter_name == 'simple_category' || $discounter_name == 'simple_membership') {
$cumulative = false;
}
return $cumulative;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment