Fix discount (#48)
This commit is contained in:
parent
e10d492d94
commit
83cab09013
@ -368,7 +368,7 @@ if ( ! class_exists( 'WC_Retailcrm_Orders' ) ) :
|
||||
|
||||
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;
|
||||
|
@ -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
|
||||
|
@ -15,7 +15,7 @@
|
||||
*
|
||||
*
|
||||
* @link https://wordpress.org/plugins/woo-retailcrm/
|
||||
* @since 2.0.4
|
||||
* @since 2.0.5
|
||||
*
|
||||
* @package RetailCRM
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user