Title: Fatal Error
Last modified: March 4, 2019

---

# Fatal Error

 *  Resolved [robsarna](https://wordpress.org/support/users/robsarna/)
 * (@robsarna)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-3145/)
 * Hi,
 * When working with WPML / Woocommerce I am getting a fatal error when attempting
   to translate some of my products.
 * Without debug mode on, i get a 500 error.
 * With debug turned on, the error is:
 * `Fatal error: Uncaught Error: Call to a member function get_cart() on null in/
   wp-content/plugins/minmax-quantity-for-woocommerce/main.php:689 Stack trace: #
   0 /wp-content/plugins/minmax-quantity-for-woocommerce/includes/addons/set_input_limitation.
   php(64): BeRocket_MM_Quantity->new_calculate_total(NULL, Array, 'check_product_v...',
   1332, 1333) #1 /wp-content/plugins/minmax-quantity-for-woocommerce/includes/addons/
   set_input_limitation.php(19): BeRocket_MM_Quantity_input_limitations->get_input_data_for_product(
   Array, Object(WC_Product_Variation)) #2 /wp-includes/class-wp-hook.php(286): 
   BeRocket_MM_Quantity_input_limitations->woocommerce_available_variation(Array,
   Object(WC_Product_Variable), Object(WC_Product_Variation)) #3 /wp-includes/plugin.
   php(208): WP_Hook->apply_filters(Array, Array) #4 /Users/robsarna/Dropbox/websites/
   bmw in /wp-content/plugins/minmax-quantity-for-woocommerce/main.php on line 689`
 * Any help would be appreciated.
 * Thanks

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

 *  Plugin Author [Dmytro Holovnia](https://wordpress.org/support/users/dholovnia/)
 * (@dholovnia)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-3145/#post-11272503)
 * Hi,
 * Thank you for the message.
 * We will check it asap.
 * Regards,
    Dima
 *  Thread Starter [robsarna](https://wordpress.org/support/users/robsarna/)
 * (@robsarna)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-3145/#post-11285342)
 * Hi [@dholovnia](https://wordpress.org/support/users/dholovnia/) – Any luck with
   this?
 *  Plugin Author [Dmytro Holovnia](https://wordpress.org/support/users/dholovnia/)
 * (@dholovnia)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-3145/#post-11285885)
 * Hi,
 * No luck as for now. We will update this thread when issue will be found or more
   info needed.
 * Regards,
    Dima
 *  Plugin Author [Dmytro Holovnia](https://wordpress.org/support/users/dholovnia/)
 * (@dholovnia)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-3145/#post-11297901)
 * Hi,
 * Could you please describe your actions before the error was shown?
 * We are trying to reproduce the issue using this plugin and WPML and no still 
   luck to see it.
 * Regards,
    Dima
 *  Thread Starter [robsarna](https://wordpress.org/support/users/robsarna/)
 * (@robsarna)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-3145/#post-11297972)
 * Hi Dima,
 * Do you have Woocommerce Multilingual plugin installed from WPML?
 * If so, I goto products – click the ‘translate woocommerce products’ button. Then
   when clicking on some of the products in other languages, it throws up the error.
 * For some reason, some of the products are ok, others have the error. Here is 
   the most recent error in case it helps:
 * `Fatal error: Uncaught Error: Call to a member function get_cart() on null in/
   wp-content/plugins/minmax-quantity-for-woocommerce/main.php:698 Stack trace: #
   0 /wp-content/plugins/minmax-quantity-for-woocommerce/includes/addons/set_input_limitation.
   php(64): BeRocket_MM_Quantity->new_calculate_total(NULL, Array, 'check_product_v...',
   1332, 1333) #1 /wp-content/plugins/minmax-quantity-for-woocommerce/includes/addons/
   set_input_limitation.php(19): BeRocket_MM_Quantity_input_limitations->get_input_data_for_product(
   Array, Object(WC_Product_Variation)) #2 /wp-includes/class-wp-hook.php(286): 
   BeRocket_MM_Quantity_input_limitations->woocommerce_available_variation(Array,
   Object(WC_Product_Variable), Object(WC_Product_Variation)) #3 /wp-includes/plugin.
   php(208): WP_Hook->apply_filters(Array, Array) #4 in /wp-content/plugins/minmax-
   quantity-for-woocommerce/main.php on line 698`
 * Thanks again
 * Rob
    -  This reply was modified 7 years, 3 months ago by [robsarna](https://wordpress.org/support/users/robsarna/).
      Reason: removed relative error paths
 *  Thread Starter [robsarna](https://wordpress.org/support/users/robsarna/)
 * (@robsarna)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-3145/#post-11311986)
 * Hi Dima [@dholovnia](https://wordpress.org/support/users/dholovnia/),
 * Not sure if this helps, but this seems to be related to the WPML translation 
   edito r([https://wpml.org/documentation/translating-your-contents/using-the-translation-editor/](https://wpml.org/documentation/translating-your-contents/using-the-translation-editor/)),
   and only seems to break on variable products (simple products are fine).
 * When you use the it has the above error, when you translate on the normal page
   it seems fine.
 * Hope that helps you to debug!
 *  Plugin Author [Dmytro Holovnia](https://wordpress.org/support/users/dholovnia/)
 * (@dholovnia)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-3145/#post-11311996)
 * Hi Rob,
 * Please open plugin settings page, tab Addons, turn off addon and save.
 * Try again. Is the error still there?
 * Regards,
    Dima
 *  Thread Starter [robsarna](https://wordpress.org/support/users/robsarna/)
 * (@robsarna)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-3145/#post-11312012)
 * Hi Dima,
 * That has fixed it!
 * Thanks so much!
 * Rob

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

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

 * ![](https://ps.w.org/minmax-quantity-for-woocommerce/assets/icon-256x256.gif?
   rev=2770663)
 * [Min and Max Quantity for WooCommerce](https://wordpress.org/plugins/minmax-quantity-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/minmax-quantity-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/minmax-quantity-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/minmax-quantity-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/minmax-quantity-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/minmax-quantity-for-woocommerce/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [robsarna](https://wordpress.org/support/users/robsarna/)
 * Last activity: [7 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-3145/#post-11312012)
 * Status: resolved