1
0
Fork 0
mirror of synced 2025-03-30 04:00:16 +03:00

Fix bug with shipping tax

This commit is contained in:
Dima Uryvskiy 2022-08-01 16:51:55 +03:00 committed by GitHub
parent ebdc410fda
commit 2b4f670b8c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -379,10 +379,12 @@ if (!class_exists('WC_Retailcrm_Orders')) :
? $shipping['total'] + $shipping['total_tax'] ? $shipping['total'] + $shipping['total_tax']
: $shipping['total']; : $shipping['total'];
$rate = getShippingRates(); if (wc_tax_enabled()) {
$rate = getShippingRates();
if (!empty($rate)) { if (!empty($rate)) {
$orderData['delivery']['vatRate'] = $rate; $orderData['delivery']['vatRate'] = $rate;
}
} }
} }
} }