diff --git a/woo-retailcrm/include/class-wc-retailcrm-orders.php b/woo-retailcrm/include/class-wc-retailcrm-orders.php index d1603a0d..32660a46 100644 --- a/woo-retailcrm/include/class-wc-retailcrm-orders.php +++ b/woo-retailcrm/include/class-wc-retailcrm-orders.php @@ -368,7 +368,7 @@ public function processOrder($order_id, $update = false) foreach ($order->get_items() as $item) { $uid = ($item['variation_id'] > 0) ? $item['variation_id'] : $item['product_id'] ; - $price = round($item['line_subtotal'] + $item['line_subtotal_tax'], 2); + $price = round(($item['line_subtotal'] / $item->get_quantity()) + ($item['line_subtotal_tax'] / $item->get_quantity()), 2); $product_price = $item->get_total() ? $item->get_total() / $item->get_quantity() : 0; $product_tax = $item->get_total_tax() ? $item->get_total_tax() / $item->get_quantity() : 0; diff --git a/woo-retailcrm/retailcrm.php b/woo-retailcrm/retailcrm.php index 2c31628b..c2c88ac7 100644 --- a/woo-retailcrm/retailcrm.php +++ b/woo-retailcrm/retailcrm.php @@ -1,6 +1,6 @@