Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AshlinRejo/d5ac46459d54db866c264e215dddf101 to your computer and use it in GitHub Desktop.
Save AshlinRejo/d5ac46459d54db866c264e215dddf101 to your computer and use it in GitHub Desktop.
Woo Discount Rules v2 - Bogo issue (free product quantity calculation)
add_filter('advanced_woo_discount_rules_modify_price_html', function($result, $price_html, $product, $quantity){
// is_page( 'cart' ) -> cart is a page slug
if ( is_page( 'cart' ) || is_cart() ) {
return false;
}
return $result;
}, 10, 4);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment