From c21e12e82a65634a47cf7c47c7eecdf780aa08a1 Mon Sep 17 00:00:00 2001 From: Rodrigo Primo Date: Mon, 7 Feb 2022 11:38:32 -0300 Subject: [PATCH] Fix ranges for displaying colors in stats email The specs for [MAILPOET-3324] had a minor error that is fixed by this commit. The ranges for displaying different colors for the percentage of clicks should be < 1%, 1-3% and > 3% instead of < 10%, 10-30% and > 30%. [MAILPOET-3324] --- mailpoet/lib/Twig/Functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mailpoet/lib/Twig/Functions.php b/mailpoet/lib/Twig/Functions.php index 4e3dd9546c..8a82f3dbb7 100644 --- a/mailpoet/lib/Twig/Functions.php +++ b/mailpoet/lib/Twig/Functions.php @@ -261,9 +261,9 @@ class Functions extends AbstractExtension { } public function statsColor($percentage) { - if ($percentage > 30) { + if ($percentage > 3) { return '#7ed321'; - } elseif ($percentage > 10) { + } elseif ($percentage > 1) { return '#ff9f00'; } else { return '#f559c3';