Title: Math Error
Last modified: December 29, 2018

---

# Math Error

 *  [kenlyle](https://wordpress.org/support/users/kenlyle/)
 * (@kenlyle)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/math-error/)
 * I have a cart with $60 of items plus the trigger item, and the 25% discount is
   calculating as $14.50. Is there a $.50 tax or something hidden somewhere?
 * See [this](https://drive.google.com/open?id=1ZFzBtRjflW0SeptPc7spp39AmqInFyib)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Soft79](https://wordpress.org/support/users/josk79/)
 * (@josk79)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/math-error/#post-11036549)
 * Please show me the complete cart and totals. Or even better: an url + instructions
   to reproduce.
 *  Thread Starter [kenlyle](https://wordpress.org/support/users/kenlyle/)
 * (@kenlyle)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/math-error/#post-11036588)
 * Thanks…and, Ooops. Apologies. See [here](https://drive.google.com/open?id=1tjMKskLFlP3DEZwRPN0QqKgomSkDIxYH)
 * The cost of the Lunch Package was accidentally close to the price of the food
   being added to the cart with that Package. That caused the confusion.
 * You can see what I am trying to get at…Food is 25% off (the Dinner price) during
   Lunch. I am trying to not have to create a Lunch and Dinner variation for each
   item, with different prices.
 * So, the Lunch item being in the Cart is the trigger, but it looks like I have
   to add Every item to the Product OR to get the discount to apply to that item.
   I put the Meal Packages category in the Category Exclude because the Lunch Package
   should not be discounted.
 * The problem with putting every product in the Product OR is that it defeats the
   idea of having only the Lunch item as the trigger. Is there a simple workaround
   I am missing??
 * Thanks again.
 *  Plugin Author [Soft79](https://wordpress.org/support/users/josk79/)
 * (@josk79)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/math-error/#post-11036598)
 * Hmmm… I’m not sure but maybe this can be done by using both Included and Excluded
   categories…
 *  Thread Starter [kenlyle](https://wordpress.org/support/users/kenlyle/)
 * (@kenlyle)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/math-error/#post-11036605)
 * Well, it’s actually including one product, and excluding one category, but, yeah.
 * What would be the nature of the hack that would do what I am looking for? It 
   seems to be using the Lunch product as a trigger, but removing the filtering 
   of products to which the discount is applied? Does this use case happen to make
   you want to modify the plugin slightly? Or does the Pro version cover this case,
   perhaps?
 *  Plugin Author [Soft79](https://wordpress.org/support/users/josk79/)
 * (@josk79)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/math-error/#post-11036616)
 * This would require a php snippet that excludes the trigger product from being
   discounted. I’ve published it on this forum or soft79.nl before, please try to
   find it. I’m currently not near a PC.
 * Otherwise I need to take a look next week.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Math Error’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-auto-added-coupons/assets/icon-256x256.png?rev
   =3357537)
 * [Extended Coupon Features for WooCommerce FREE](https://wordpress.org/plugins/woocommerce-auto-added-coupons/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-auto-added-coupons/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-auto-added-coupons/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-auto-added-coupons/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-auto-added-coupons/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-auto-added-coupons/reviews/)

## Tags

 * [calculations](https://wordpress.org/support/topic-tag/calculations/)
 * [Math](https://wordpress.org/support/topic-tag/math/)

 * 5 replies
 * 2 participants
 * Last reply from: [Soft79](https://wordpress.org/support/users/josk79/)
 * Last activity: [7 years, 5 months ago](https://wordpress.org/support/topic/math-error/#post-11036616)
 * Status: not resolved