PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.7.0
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.7.0
1.7.0 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 All 50 releases
← All changes | app/Http/Controllers/FrontendControllers/CustomerOrderController.php +4 -4 1.6.4 → 1.7.0 View file →
@@ -29,9 +29,8 @@
29 29 use FluentCart\App\Services\Renderer\Receipt\TaxSummaryHelper;
30 30 use FluentCart\Framework\Database\Orm\Builder;
31 31 use FluentCart\Framework\Database\Orm\Relations\HasMany;
32 32 use FluentCart\Framework\Http\Request\Request;
33 -use FluentCart\App\Services\DateTime\DateTime;
34 33 use FluentCart\Framework\Support\Arr;
35 34 use FluentCart\Framework\Support\Collection;
36 35 use FluentCart\Framework\Validator\Validator;
37 36 use FluentCartPro\App\Modules\Licensing\Models\License;
@@ -82,9 +81,9 @@
82 81 ->paginate($perPage, ['*'], 'page', $page);
83 82
84 83 $orders->transform(function ($order) {
85 84 return [
86 - 'created_at' => DateTime::gmtToTimezone($order->created_at, Arr::get($order->config, 'user_tz', wp_timezone_string()))->format('Y-m-d H:i:s'),
85 + 'created_at' => $order->created_at->format('Y-m-d H:i:s'),
87 86 'invoice_no' => $order->invoice_no,
88 87 'total_amount' => $order->total_amount,
89 88 'currency' => $order->currency,
90 89 'uuid' => $order->uuid,
@@ -239,8 +238,9 @@
239 238 $variationIds[] = $item->object_id;
240 239 $productIds[] = $item->post_id;
241 240 }
242 241
242 +
243 243 $upgradableVariationIds = [];
244 244 $isUpgradeEligibleOrder = in_array($order->payment_status, [
245 245 Status::PAYMENT_PAID,
246 246 Status::PAYMENT_PARTIALLY_PAID,
@@ -265,9 +265,9 @@
265 265
266 266 $formattedOrderData = [
267 267 'fulfillment_type' => $order->fulfillment_type,
268 268 'type' => $order->type,
269 - 'created_at' => DateTime::gmtToTimezone($order->created_at, Arr::get($order->config, 'user_tz', wp_timezone_string()))->format('Y-m-d H:i:s'),
269 + 'created_at' => $order->created_at->format('Y-m-d H:i:s'),
270 270 'invoice_no' => $order->invoice_no,
271 271 'currency' => $order->currency,
272 272 'uuid' => $order->uuid,
273 273 'order_items' => $orderItems,
@@ -302,9 +302,9 @@
302 302 ];
303 303
304 304 $formattedOrderData['subscriptions'] = $order->subscriptions
305 305 ->filter(function ($subscription) {
306 - return !in_array($subscription->status, [Status::SUBSCRIPTION_PENDING, Status::SUBSCRIPTION_INTENDED]);
306 + return $subscription->isVisibleToCustomer();
307 307 })
308 308 ->map(function ($subscription) {
309 309 return OrderService::transformSubscription($subscription);
310 310 });