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/Services/WpMetaHelper.php +10 -4 1.5.3 → 1.6.5 View file →
@@ -2,8 +2,9 @@
2 2
3 3 namespace FluentCart\App\Services;
4 4
5 5 use FluentCart\Api\StoreSettings;
6 +use FluentCart\App\Services\DateTime\DateFormatter;
6 7 use FluentCart\Framework\Support\Arr;
7 8
8 9 if (!defined('ABSPATH')) {
9 10 exit;
@@ -85,16 +86,21 @@
85 86 }
86 87
87 88 public function getOtherData($key)
88 89 {
90 + // wp_date(), not current_time(): current_time() is gmdate() underneath,
91 + // so it renders the store's format with English month and weekday
92 + // names -- '14. October 2026' on a German store, which is the exact
93 + // half-translated string DateFormatter exists to remove. wp_date()
94 + // with no timestamp is the same instant in the same site timezone,
95 + // only localized. The format comes from DateFormatter so these two
96 + // shortcodes follow date_time_format_source like every other date.
89 97 if ($key == 'date') {
90 - $dateFormat = get_option('date_format');
91 - return current_time($dateFormat);
98 + return wp_date(DateFormatter::dateFormat());
92 99 }
93 100
94 101 if ($key == 'time') {
95 - $dateFormat = get_option('time_format');
96 - return current_time($dateFormat);
102 + return wp_date(DateFormatter::timeFormat());
97 103 }
98 104 if ($key == 'user_ip') {
99 105 return $this->entry->ip_address;
100 106 }