From c6e5002ebd32270ca3280473134e8928b4904295 Mon Sep 17 00:00:00 2001 From: Kumi Date: Tue, 11 Mar 2025 10:44:17 +0100 Subject: [PATCH] feat: Replace main instance URLs with instance-specific URLs in Email class --- src/classes/wishthis/Email.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/classes/wishthis/Email.php b/src/classes/wishthis/Email.php index c2a27585..ecb133f0 100644 --- a/src/classes/wishthis/Email.php +++ b/src/classes/wishthis/Email.php @@ -29,6 +29,10 @@ class Email $this->mjml = str_replace('', $this->contentsPart, $this->contentsTemplate); + /** Replace references to wishthis.online with instance-specific information */ + $baseurl = $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST']; + $this->mjml = str_replace('https://wishthis.online', $baseurl, $this->mjml); + /** Set Locale */ global $locale;