| @@ -5,8 +5,9 @@ | ||
| 5 | 5 | use FluentCart\Api\StoreSettings; |
| 6 | 6 | use FluentCart\App\App; |
| 7 | 7 | use FluentCart\App\Helpers\Helper; |
| 8 | 8 | use FluentCart\App\Helpers\Status; |
| 9 | +use FluentCart\App\Services\DateTime\DateFormatter; | |
| 9 | 10 | use FluentCart\App\Services\Report\DefaultReportService; |
| 10 | 11 | use FluentCart\App\Services\ShortCodeParser\ShortcodeTemplateBuilder; |
| 11 | 12 | use FluentCart\Framework\Support\Arr; |
| 12 | 13 | |
| @@ -307,9 +308,9 @@ | ||
| 307 | 308 | 'intro' => '', |
| 308 | 309 | 'reports_url' => admin_url('admin.php?page=fluent-cart#/reports'), |
| 309 | 310 | 'settings_url' => admin_url('admin.php?page=fluent-cart#/settings/email_digest_settings'), |
| 310 | 311 | 'is_pro' => App::isProActive(), |
| 311 | - 'pro_url' => apply_filters('fluent_cart/store_digest/pro_url', 'https://fluentcart.com/pricing/'), | |
| 312 | + 'pro_url' => apply_filters('fluent_cart/store_digest/pro_url', 'https://fluentcart.com/discount-deal/'), | |
| 312 | 313 | 'is_empty' => $orderCount === 0, |
| 313 | 314 | 'subject' => '', |
| 314 | 315 | 'metrics' => [ |
| 315 | 316 | 'gross_sale' => self::money(Arr::get($current, 'gross_sale', 0)), |
| @@ -571,20 +572,26 @@ | ||
| 571 | 572 | { |
| 572 | 573 | $startTs = strtotime($start); |
| 573 | 574 | $endTs = strtotime($end); |
| 574 | 575 | |
| 576 | + // date_i18n (not DateFormatter::format) because windowFor() hands us bare | |
| 577 | + // LOCAL wall-clock strings, not GMT -- converting them would shift the label. | |
| 578 | + // Only the pattern comes from the store's settings. | |
| 575 | 579 | if ($frequency === 'monthly') { |
| 576 | - return date_i18n('F Y', $startTs); | |
| 580 | + // A month-and-year label has no WordPress setting of its own, so it is | |
| 581 | + // derived from the store's date format -- a year-first locale keeps its | |
| 582 | + // own field order instead of the English 'month year'. | |
| 583 | + return date_i18n(DateFormatter::monthYearFormat(), $startTs); | |
| 577 | 584 | } |
| 578 | 585 | if ($frequency === 'weekly') { |
| 579 | - /* translators: %1$s: start date (e.g. May 19), %2$s: end date (e.g. May 25, 2026) */ | |
| 586 | + /* translators: %1$s: start date, %2$s: end date */ | |
| 580 | 587 | return sprintf( |
| 581 | 588 | __('%1$s – %2$s', 'fluent-cart'), |
| 582 | - date_i18n('M j', $startTs), | |
| 583 | - date_i18n('M j, Y', $endTs) | |
| 589 | + date_i18n(DateFormatter::dateFormat(), $startTs), | |
| 590 | + date_i18n(DateFormatter::dateFormat(), $endTs) | |
| 584 | 591 | ); |
| 585 | 592 | } |
| 586 | - return date_i18n('F j, Y', $startTs); | |
| 593 | + return date_i18n(DateFormatter::dateFormat(), $startTs); | |
| 587 | 594 | } |
| 588 | 595 | |
| 589 | 596 | private static function storeName(): string |
| 590 | 597 | { |
| @@ -742,12 +749,12 @@ | ||
| 742 | 749 | * per angle. Starts from the (already-filtered) pro_url carried in the payload. |
| 743 | 750 | */ |
| 744 | 751 | private static function proPromoUrl(array $payload, string $variant): string |
| 745 | 752 | { |
| 746 | - $base = (string) Arr::get($payload, 'pro_url', 'https://fluentcart.com/pricing/'); | |
| 753 | + $base = (string) Arr::get($payload, 'pro_url', 'https://fluentcart.com/discount-deal/'); | |
| 747 | 754 | |
| 748 | 755 | return add_query_arg([ |
| 749 | - 'utm_source' => 'fluentcart', | |
| 756 | + 'utm_source' => 'fluent-cart', | |
| 750 | 757 | 'utm_medium' => 'email', |
| 751 | 758 | 'utm_campaign' => 'store_digest', |
| 752 | 759 | 'utm_content' => (string) Arr::get($payload, 'frequency', 'daily') . '_' . $variant, |
| 753 | 760 | ], $base); |