← All changes
|
app/Services/ShortCodeParser/Parsers/OrderParser.php
+5
-6
1.6.4
→
1.6.5
View file →
| @@ -9,8 +9,9 @@ | ||
| 9 | 9 | use FluentCart\App\Models\Order; |
| 10 | 10 | use FluentCart\App\Models\Subscription; |
| 11 | 11 | use FluentCart\App\Modules\PaymentMethods\Core\GatewayManager; |
| 12 | 12 | use FluentCart\App\Services\DateTime\DateTime; |
| 13 | +use FluentCart\App\Services\DateTime\DateFormatter; | |
| 13 | 14 | use FluentCart\App\Services\Payments\PaymentHelper; |
| 14 | 15 | use FluentCart\App\Services\Payments\PaymentReceipt; |
| 15 | 16 | use FluentCart\App\Services\TemplateService; |
| 16 | 17 | use FluentCart\App\Services\Renderer\Receipt\TaxSummaryHelper; |
| @@ -104,14 +105,12 @@ | ||
| 104 | 105 | if (in_array($accessor, ['updated_at', 'created_at'])) { |
| 105 | 106 | $date = Arr::get($this->data, $this->attributeMap[$accessor]); |
| 106 | 107 | $timestamp = DateTime::anyTimeToGmt($date)->getTimestamp(); |
| 107 | 108 | |
| 108 | - $date = wp_date( | |
| 109 | - get_option('date_format'), | |
| 110 | - $timestamp, | |
| 111 | - new \DateTimeZone($this->orderTz) | |
| 112 | - ); | |
| 113 | - | |
| 109 | + // Through DateFormatter so the store's format and timezone settings | |
| 110 | + // reach this too; orderTz is only consulted on the Browser source. | |
| 111 | + $date = DateFormatter::format($timestamp, false, $this->orderTz); | |
| 112 | + | |
| 114 | 113 | return Helper::translateNumber($date); |
| 115 | 114 | } |
| 116 | 115 | |
| 117 | 116 | // Handle _formatted suffix for cent columns (e.g. total_amount_formatted) |