Skip to content

Commit 408247a

Browse files
authored
Fixed zero VAT handling (#372)
1 parent 144dabe commit 408247a

File tree

8 files changed

+14
-11
lines changed

8 files changed

+14
-11
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 2025-06-30 4.8.29
2+
* Fixed zero VAT handling
3+
14
## 2025-06-25 4.8.28
25
* Applying the bonus conversion coefficient to currency
36

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.8.28
1+
4.8.29

src/include/class-wc-retailcrm-icml.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ private function getOffer(array $productAttributes, WC_Product $product, $parent
268268
'categoryId' => $termList,
269269
'dimensions' => $dimensions,
270270
'weight' => $weight,
271-
'tax' => isset($tax) ? $tax['rate'] : 'none',
271+
'tax' => isset($tax['rate']) && $tax['rate'] !== 0 ? $tax['rate'] : 'none',
272272
'type' => ($this->unloadServices && $product->is_virtual()) ? 'service' : 'product',
273273
];
274274

src/include/components/class-wc-retailcrm-loyalty-form.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function getInfoLoyalty(array $loyaltyAccount)
7373
'credit_for_order' => __('Сredited for order ', 'retailcrm'),
7474
'burn' => __('Burn','retailcrm'),
7575
'charge_for_order' => __('Сharged for order ', 'retailcrm'),
76-
'credit_for_event' => __('Credited by event', 'retailcrm')
76+
'credit_for_event' => __('Credited for event', 'retailcrm')
7777
];
7878
$currency = ' ' . $loyaltyAccount['loyalty']['currency'];
7979
$burnInfo = $loyaltyAccount['burnBonuses'][0] ?: [];

src/include/icml/class-wc-retailcrm-icml-writer.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,7 @@ private function addOffers($offers)
163163
$this->writer->writeElement('weight', $offer['weight']);
164164
}
165165

166-
if (!empty($offer['tax'])) {
167-
$this->writer->writeElement('vatRate', $offer['tax']);
168-
}
169-
166+
$this->writer->writeElement('vatRate', $offer['tax']);
170167
$this->writer->endElement(); // end </offer>
171168
}
172169
}

src/readme.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Tags: Интеграция, Simla.com, simla
55
Requires PHP: 7.1
66
Requires at least: 5.3
77
Tested up to: 6.8
8-
Stable tag: 4.8.28
8+
Stable tag: 4.8.29
99
License: GPLv1 or later
1010
License URI: http://www.gnu.org/licenses/gpl-1.0.html
1111

@@ -82,6 +82,9 @@ Asegúrate de tener una clave API específica para cada tienda. Las siguientes i
8282

8383

8484
== Changelog ==
85+
= 4.8.29 =
86+
* Fixed zero VAT handling
87+
8588
= 4.8.28 =
8689
* Applying the bonus conversion coefficient to currency
8790

src/retailcrm.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Description: Integration plugin for WooCommerce & Simla.com
66
* Author: RetailDriver LLC
77
* Author URI: http://retailcrm.pro/
8-
* Version: 4.8.28
8+
* Version: 4.8.29
99
* Tested up to: 6.8
1010
* Requires Plugins: woocommerce
1111
* WC requires at least: 5.4
@@ -27,7 +27,7 @@
2727
class WC_Integration_Retailcrm {
2828
const WOOCOMMERCE_SLUG = 'woocommerce';
2929
const WOOCOMMERCE_PLUGIN_PATH = 'woocommerce/woocommerce.php';
30-
const MODULE_VERSION = '4.8.28';
30+
const MODULE_VERSION = '4.8.29';
3131

3232
private static $instance;
3333

src/uninstall.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* @link https://wordpress.org/plugins/woo-retailcrm/
1818
*
19-
* @version 4.8.28
19+
* @version 4.8.29
2020
*
2121
* @package RetailCRM
2222
*/

0 commit comments

Comments
 (0)