Title: CRITICAL Uncaught DivisionByZeroError
Last modified: June 7, 2021

---

# CRITICAL Uncaught DivisionByZeroError

 *  Resolved [vendelbo](https://wordpress.org/support/users/vendelbo/)
 * (@vendelbo)
 * [5 years ago](https://wordpress.org/support/topic/critical-uncaught-divisionbyzeroerror/)
 * Hi – I’m having an issue with all products on a site, where the MinMax feature
   is not enabled. They cannot be added to cart, and gives: “Critical Error”.
 * When I enable and set Min to 1 and Max to 999 it works again.
 * I’m running WordPress 5.7.2 and Woocommerce Minimum and Maximum Quantity v 2.1.6
 * Your help will be gladly appreciated.

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

 *  Plugin Author [Ashok G](https://wordpress.org/support/users/wpashokg/)
 * (@wpashokg)
 * [5 years ago](https://wordpress.org/support/topic/critical-uncaught-divisionbyzeroerror/#post-14528692)
 * let me check again.
 *  [escii](https://wordpress.org/support/users/escii/)
 * (@escii)
 * [5 years ago](https://wordpress.org/support/topic/critical-uncaught-divisionbyzeroerror/#post-14530640)
 * 2.1.6 broak several ecommerce sites, reverted back to 2.1.5
 *  [Andrea La-Rosa Jimenez](https://wordpress.org/support/users/larosadigital/)
 * (@larosadigital)
 * [5 years ago](https://wordpress.org/support/topic/critical-uncaught-divisionbyzeroerror/#post-14531137)
 * I’m having the same issue on all the sites I have this installed on that updated
   to 2.1.6. I’ve gone ahead and reverted to 2.1.5 to fix the issue for now, but
   it’s a genuine bug.
 *  [eworm](https://wordpress.org/support/users/eworm/)
 * (@eworm)
 * [5 years ago](https://wordpress.org/support/topic/critical-uncaught-divisionbyzeroerror/#post-14531410)
 * It’s a bug, got the same error on my site.
 *  Plugin Author [Ashok G](https://wordpress.org/support/users/wpashokg/)
 * (@wpashokg)
 * [5 years ago](https://wordpress.org/support/topic/critical-uncaught-divisionbyzeroerror/#post-14535371)
 * Hi All,
 * I’ve fixed the bug in the new version today. Can you check now. Thanks for all
   your love and support for this plugin.
 *  [Andrea La-Rosa Jimenez](https://wordpress.org/support/users/larosadigital/)
 * (@larosadigital)
 * [5 years ago](https://wordpress.org/support/topic/critical-uncaught-divisionbyzeroerror/#post-14535394)
 * Still having the same critical error with the new version. All plugins and WP
   core up to date, all plugins turned off but WooCommerce and this one, default
   theme – still happens. I temporarily re-reverted to the older version.
 * Here is the critical error that appears over and over in the WC fatal error status
   log
 * `2021-06-07T15:23:06+00:00 CRITICAL Uncaught DivisionByZeroError: Modulo by zero
   in /nas/content/live/beenaturals/wp-content/plugins/woo-min-max-quantity-limit/
   woo-min-max-quantity.php:149
    Stack trace: #0 /nas/content/live/beenaturals/wp-
   includes/class-wp-hook.php(294): wc_mmax_custom_add_to_cart(‘7473c8461a51ce2…’,
   102885) #1 /nas/content/live/beenaturals/wp-includes/class-wp-hook.php(316): 
   WP_Hook->apply_filters(”, Array) #2 /nas/content/live/beenaturals/wp-includes/
   plugin.php(484): WP_Hook->do_action(Array) #3 /nas/content/live/beenaturals/wp-
   content/plugins/woocommerce/includes/class-wc-cart.php(1276): do_action(‘woocommerce_add…’,‘
   7473c8461a51ce2…’, 102885, 1, 0, Array, Array) #4 /nas/content/live/beenaturals/
   wp-content/plugins/woocommerce/includes/class-wc-ajax.php(422): WC_Cart->add_to_cart(
   102885, 1, 0, Array) #5 /nas/content/live/beenaturals/wp-includes/class-wp-hook.
   php(292): WC_AJAX::add_to_cart(”) #6 /nas/content/live/beenaturals/wp-includes/
   class-wp-hook.php(316): WP_Hook->apply_filters(”, Array) #7 /nas/content/live/
   been in /nas/content/live/beenaturals/wp-content/plugins/woo-min-max-quantity-
   limit/woo-min-max-quantity.php on line 149
 *  Plugin Author [Ashok G](https://wordpress.org/support/users/wpashokg/)
 * (@wpashokg)
 * [5 years ago](https://wordpress.org/support/topic/critical-uncaught-divisionbyzeroerror/#post-14536766)
 * [@larosadigital](https://wordpress.org/support/users/larosadigital/) , can you
   check now. in 2.1.8 I’ve added a fix
 *  [escii](https://wordpress.org/support/users/escii/)
 * (@escii)
 * [5 years ago](https://wordpress.org/support/topic/critical-uncaught-divisionbyzeroerror/#post-14538235)
 * seems to work, thank you! 🙂
 *  Plugin Author [Ashok G](https://wordpress.org/support/users/wpashokg/)
 * (@wpashokg)
 * [5 years ago](https://wordpress.org/support/topic/critical-uncaught-divisionbyzeroerror/#post-14539888)
 * [@escii](https://wordpress.org/support/users/escii/) thank you for checking it.
   
   Can you write a review if possible.

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

The topic ‘CRITICAL Uncaught DivisionByZeroError’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/woo-min-max-quantity-limit.svg)
 * [Simple Minimum and Maximum Quantity Limit for WooCommerce](https://wordpress.org/plugins/woo-min-max-quantity-limit/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-min-max-quantity-limit/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-min-max-quantity-limit/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-min-max-quantity-limit/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-min-max-quantity-limit/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-min-max-quantity-limit/reviews/)

 * 9 replies
 * 5 participants
 * Last reply from: [Ashok G](https://wordpress.org/support/users/wpashokg/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/critical-uncaught-divisionbyzeroerror/#post-14539888)
 * Status: resolved