Repository Forums Support WooCommerce Extended Coupon Features PRO single request to cart page generates 4 divide by zero on the same coupon Reply To: single request to cart page generates 4 divide by zero on the same coupon

#3110
Jonathan Moore
Participant

on improving the debugging code we see the value returned appears to be 0.00 which is not matching to boolean false but is triggering divide by zero:

[22-Apr-2018 09:30:54 UTC] wjecf suppressing divide by zeron on coupon id 15209 – actual value returned from $wrap_coupon->get_minimum_amount() was: “0.00”
[22-Apr-2018 09:30:54 UTC] wjecf suppressing divide by zeron on coupon id 15209 – actual value returned from $wrap_coupon->get_minimum_amount() was: “0.00”
[22-Apr-2018 09:30:57 UTC] wjecf suppressing divide by zeron on coupon id 15209 – actual value returned from $wrap_coupon->get_minimum_amount() was: “0.00”
[22-Apr-2018 09:31:09 UTC] wjecf suppressing divide by zeron on coupon id 15209 – actual value returned from $wrap_coupon->get_minimum_amount() was: “0.00”
[22-Apr-2018 09:31:09 UTC] wjecf suppressing divide by zeron on coupon id 15209 – actual value returned from $wrap_coupon->get_minimum_amount() was: “0.00”
[22-Apr-2018 09:31:10 UTC] wjecf suppressing divide by zeron on coupon id 15209 – actual value returned from $wrap_coupon->get_minimum_amount() was: “0.00”
[22-Apr-2018 09:31:18 UTC] wjecf suppressing divide by zeron on coupon id 15209 – actual value returned from $wrap_coupon->get_minimum_amount() was: “0.00”
[22-Apr-2018 09:31:18 UTC] wjecf suppressing divide by zeron on coupon id 15209 – actual value returned from $wrap_coupon->get_minimum_amount() was: “0.00”
[22-Apr-2018 09:31:20 UTC] wjecf suppressing divide by zeron on coupon id 15209 – actual value returned from $wrap_coupon->get_minimum_amount() was: “0.00”
[22-Apr-2018 09:31:21 UTC] wjecf suppressing divide by zeron on coupon id 15209 – actual value returned from $wrap_coupon->get_minimum_amount() was: “0.00”
[22-Apr-2018 09:31:32 UTC] wjecf suppressing divide by zeron on coupon id 15209 – actual value returned from $wrap_coupon->get_minimum_amount() was: “0.00”

Another interesting question is why does this code get called 10 times when adding 1 coupon to the cart…