PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.6.5
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.6.5
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 trunk All 48 releases
← All changes | app/Helpers/AdminOrderProcessor.php +21 -0 1.6.2 → 1.6.5 View file →
@@ -281,8 +281,29 @@
281 281 ];
282 282
283 283 $totalAmount = $orderData['subtotal'] - $orderData['coupon_discount_total'] - $orderData['manual_discount_total'] + $orderData['shipping_total'] + $orderData['tax_total'];
284 284 $orderData['total_amount'] = $totalAmount > 0 ? $totalAmount : 0;
285 +
286 + /**
287 + * Filter the prepared order data before it is used for order creation.
288 + *
289 + * This mirrors the frontend checkout hook so integrations can adjust
290 + * order payload fields consistently for manual admin orders too.
291 + *
292 + * @param array $orderData Prepared order data array.
293 + * @param array $context {
294 + * Additional context for the filter.
295 + *
296 + * @type array $items Formatted order items with prices and quantities.
297 + * @type array $args Admin order arguments: customer data, payment
298 + * method, shipping, tax, notes, and IP data.
299 + * }
300 + */
301 + $orderData = apply_filters('fluent_cart/checkout/order_data', $orderData, [
302 + 'items' => $this->formattedIOrderItems,
303 + 'args' => $this->args,
304 + ]);
305 +
285 306 $this->orderData = $orderData;
286 307 }
287 308
288 309