Title: Math errors
Last modified: August 2, 2019

---

# Math errors

 *  Resolved [Game On!](https://wordpress.org/support/users/tester2018/)
 * (@tester2018)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/math-errors/)
 * This plugin has math errors. We receive the following message when testing this
   plugin. “Failed to calculate sales tax: Cart Item has a negative Price. Only 
   positive values can be used.”

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

 *  [acowebssupport](https://wordpress.org/support/users/acowebssupport/)
 * (@acowebssupport)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/math-errors/#post-11792970)
 * Hi,
 * Sorry for the inconvenience, we have troubleshooted the issue and our team is
   working on the fix, we will be releasing an update with the fix ASAP.
 * We have cross-checked the SimpleSalesTax plugin files and could see that they
   are also considering woocommerce fee at the time of tax calculation. Our team
   is working on the necessary changes on our plugin.
 * As a temporary solution, please use the below code:
 *     ```
       add_filter('wootax_add_fees', function($addfee){
           $addfee =  false;
           return $addfee;
       });
       ```
   
 * Please paste the same on your themes functions.php file.
 * Thanks,
    Acowebs Support Team
 *  [acowebssupport](https://wordpress.org/support/users/acowebssupport/)
 * (@acowebssupport)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/math-errors/#post-11823862)
 * Hi,
 * As we haven’t heard back from you further, we assume that this issue has been
   resolved at your end and considering this ticket as closed. Please don’t hesitate
   to get back to us if you require any further assistance or clarifications from
   our end in the future. Thanks!
 *  Thread Starter [Game On!](https://wordpress.org/support/users/tester2018/)
 * (@tester2018)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/math-errors/#post-11824132)
 * We are waiting to test your update with the fix. The temporary solution does 
   not work on our website. Thank you!
 *  [acowebssupport](https://wordpress.org/support/users/acowebssupport/)
 * (@acowebssupport)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/math-errors/#post-11831131)
 * Hi,
 * We have updated the plugin. Please update it at your end and check if the issue
   still exists.
 * Thank you.
 *  [alittlemoresupport](https://wordpress.org/support/users/alittlemoresupport/)
 * (@alittlemoresupport)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/math-errors/#post-11833393)
 * Hi, the latest update caused the whole plugin useless. None of the discount rule
   is working even though they are all active and enabled. It was still working 
   yesterday, but not anymore today. I also received an email from WordPress indicating
   there is an issue with your plugin. See below. Please fix ASAP as none of my 
   customer is getting discount.
 * …In this case, WordPress caught an error with one of your plugins, Acowebs Woocommerce
   Dynamic Pricing.
    Error Details ============= An error of type E_ERROR was caused
   in line 855 of the file /srv/htdocs/wp-content/plugins/aco-woo-dynamic-pricing/
   includes/class-awdp-discount.php. Error message: Uncaught Error: Call to a member
   function get_cart() on null in /srv/htdocs/wp-content/plugins/aco-woo-dynamic-
   pricing/includes/class-awdp-discount.php:855 Stack trace: #0 /srv/htdocs/wp-content/
   plugins/aco-woo-dynamic-pricing/includes/class-awdp-discount.php(288): AWDP_Discount-
   >apply_discount_cart_quantity(Array, Object(WC_Product_Simple), ’28’) #1 /srv/
   htdocs/wp-content/plugins/aco-woo-dynamic-pricing/includes/class-awdp-discount.
   php(178): AWDP_Discount->calculate_discount(’28’, Object(WC_Product_Simple)) #
   2 /srv/htdocs/wp-content/plugins/aco-woo-dynamic-pricing/includes/class-awdp-
   front-end.php(196): AWDP_Discount->get_product_price(’28’, Object(WC_Product_Simple))#
   3 /wordpress/core/5.2.2/wp-includes/class-wp-hook.php(286): AWDP_Front_End->get_product_price(’
   28’, Object(WC_Product_Simple)) #4 /wordpress/core/5.2.2/wp-includes/plugin.php(
   208): WP_Hook->apply_filters(’28’, Array) #5 /srv/htdocs/wp-content/plugins/woocommerce/
   includes/abstracts/abstract-wc-data.php(751): apply_filters(‘woocommerce_pro…’,’
   28’, Object(WC_Product_Simple)) #6 /srv/htdocs/wp-content/plugins/woocommerce/
   includes/abstracts/abstract-wc-product.php(277): WC_Data->get_prop(‘regular_price’,‘
   view’) #7 /srv/htdocs/wp-content/plugins/woocommerce/includes/admin/list-tables/
   class-wc-admin-list-table-products.php(183): WC_Product->get_regular_price() #
   8 /srv/htdocs/wp-content/plugins/woocommerce/includes/admin/list-tables/abstract-
   class-wc-admin-list-table.php(261): WC_Admin_List_Table_Products->render_name_column()#
   9 /wordpress/core/5.2.2/wp-includes/class-wp-hook.php(286): WC_Admin_List_Table-
   >render_columns(‘name’, 1532) #10 /wordpress/core/5.2.2/wp-includes/class-wp-
   hook.php(310): WP_Hook->apply_filters(”, Array) #11 /wordpress/core/5.2.2/wp-
   includes/plugin.php(465): WP_Hook->do_action(Array) #12 /wordpress/core/5.2.2/
   wp-admin/includes/class-wp-posts-list-table.php(1257): do_action(‘manage_product_…’,‘
   name’, 1532) #13 /wordpress/core/5.2.2/wp-admin/includes/class-wp-list-table.
   php(1332): WP_Posts_List_Table->column_default(Object(WP_Post), ‘name’) #14 /
   wordpress/core/5.2.2/wp-admin/includes/class-wp-posts-list-table.php(1290): WP_List_Table-
   >single_row_columns(Object(WP_Post)) #15 /wordpress/core/5.2.2/wp-admin/includes/
   class-wp-posts-list-table.php(736): WP_Posts_List_Table->single_row(Object(WP_Post),
   0) #16 /wordpress/core/5.2.2/wp-admin/includes/class-wp-posts-list-table.php(
   713): WP_Posts_List_Table->_display_rows(Array, 0) #17 /wordpress/core/5.2.2/
   wp-admin/includes/class-wp-list-table.php(1244): WP_Posts_List_Table->display_rows()#
   18 /wordpress/core/5.2.2/wp-admin/includes/class-wp-list-table.php(1175): WP_List_Table-
   >display_rows_or_placeholder() #19 /wordpress/core/5.2.2/wp-admin/edit.php(416):
   WP_List_Table->display() #20 {main} thrown
 *  [acowebssupport](https://wordpress.org/support/users/acowebssupport/)
 * (@acowebssupport)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/math-errors/#post-11834049)
 * Sorry for the inconvenience caused.
    We have corrected the error and released
   a new update. Please update it. And let us know if any issues still persist

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

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

 * ![](https://ps.w.org/aco-woo-dynamic-pricing/assets/icon-256x256.gif?rev=3309190)
 * [Dynamic Pricing With Discount Rules for WooCommerce](https://wordpress.org/plugins/aco-woo-dynamic-pricing/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/aco-woo-dynamic-pricing/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/aco-woo-dynamic-pricing/)
 * [Active Topics](https://wordpress.org/support/plugin/aco-woo-dynamic-pricing/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/aco-woo-dynamic-pricing/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/aco-woo-dynamic-pricing/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [acowebssupport](https://wordpress.org/support/users/acowebssupport/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/math-errors/#post-11834049)
 * Status: resolved