Skip to content

Commit

Permalink
Fix discount (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
iyzoer authored and gwinn committed Feb 2, 2018
1 parent e10d492 commit 83cab09
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion woo-retailcrm/include/class-wc-retailcrm-orders.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion woo-retailcrm/retailcrm.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Version: 2.0.4
* Version: 2.0.5
* Plugin Name: WooCommerce RetailCRM
* Plugin URI: https://wordpress.org/plugins/woo-retailcrm/
* Description: Integration plugin for WooCommerce & RetailCRM
Expand Down
2 changes: 1 addition & 1 deletion woo-retailcrm/uninstall.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
*
* @link https://wordpress.org/plugins/woo-retailcrm/
* @since 2.0.4
* @since 2.0.5
*
* @package RetailCRM
*/
Expand Down

0 comments on commit 83cab09

Please sign in to comment.