PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.6.6
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.6.6
1.6.6 1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 1.3.19 All 49 releases
← All changes | app/Services/Tax/AdminOrderTaxService.php +5 -0 1.5.0 → 1.6.6 View file →
@@ -81,8 +81,12 @@
81 81 $discountTotal = (int) Arr::get($item, 'discount_total', 0);
82 82 $qty = (int) Arr::get($item, 'qty', Arr::get($item, 'quantity', 1));
83 83
84 84 $lineItems[] = [
85 + // Order-item id, when the caller has one. Custom lines all share
86 + // post_id/object_id 0:0, so the id is the only per-line identity
87 + // the patch step can match on.
88 + 'id' => $isFee ? 0 : (int) Arr::get($item, 'id', 0),
85 89 'post_id' => $isFee ? 0 : (int) Arr::get($item, 'post_id', Arr::get($item, 'product_id', 0)),
86 90 'object_id' => $isFee ? 0 : (int) Arr::get($item, 'object_id', Arr::get($item, 'variation_id', 0)),
87 91 'subtotal' => $subtotal,
88 92 'discount_total' => $discountTotal,
@@ -137,8 +141,9 @@
137 141 }
138 142
139 143 $lineItemsResult = array_values(array_map(function ($lineItem) {
140 144 return [
145 + 'id' => (int) Arr::get($lineItem, 'id', 0),
141 146 'post_id' => (int) Arr::get($lineItem, 'post_id', 0),
142 147 'object_id' => (int) Arr::get($lineItem, 'object_id', 0),
143 148 'tax_amount' => (int) Arr::get($lineItem, 'tax_amount', 0),
144 149 'line_meta' => Arr::get($lineItem, 'line_meta', []),