Title: Calculation Bug
Last modified: February 14, 2018

---

# Calculation Bug

 *  [kirash4](https://wordpress.org/support/users/kirash4/)
 * (@kirash4)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/calculation-bug/)
 * Great plugin … if only the calculations worked correctly. Setting price formulas
   on the various options, then adding multiple of a product to cart results in 
   bad pricing calculations, and mismatched price displays on the various screens.
   No response from author.

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

 *  [Group Of Oceninfo](https://wordpress.org/support/users/princebhalani143/)
 * (@princebhalani143)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/calculation-bug/#post-9924449)
 * Yes I am also facing the same issue, For me case is like when I am adding multiple
   product it’s updating both product price same instead of carry forward second
   product price.
 * i.e. If I have added Product A in cart (price=$20) and then adding Product B (
   price=$5) then on the cart page and cart total it’s showing Product B price $
   20 along with Product A.
 * So, Cart total = $40 instead of $25
 * For time being I have added below script into child theme function.php to flush
   cart before adding new product. At a time only allowing one product to be booked
   which is not good but it’s temporary solution.
 *     ```
       // before add to cart, clear cart and add value
       add_filter( 'woocommerce_add_to_cart_validation', 'woo_custom_add_to_cart_before' );
   
       function woo_custom_add_to_cart_before( $cart_item_data ) {
   
           global $woocommerce;
           $woocommerce->cart->empty_cart();
   
           // Do nothing with the data and return the cart
           return true;
       }
       ```
   
 *  [sarkparanjothi](https://wordpress.org/support/users/sarkparanjothi/)
 * (@sarkparanjothi)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/calculation-bug/#post-9931003)
 * Hi,
    Pricing rules issue fixed in WCFF – 2.0.6, please update it.

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

The topic ‘Calculation Bug’ is closed to new replies.

 * ![](https://ps.w.org/wc-fields-factory/assets/icon-128x128.jpg?rev=2738843)
 * [WC Fields Factory](https://wordpress.org/plugins/wc-fields-factory/)
 * [Support Threads](https://wordpress.org/support/plugin/wc-fields-factory/)
 * [Active Topics](https://wordpress.org/support/plugin/wc-fields-factory/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wc-fields-factory/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wc-fields-factory/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [sarkparanjothi](https://wordpress.org/support/users/sarkparanjothi/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/calculation-bug/#post-9931003)