Commit Graph

17 Commits

Author SHA1 Message Date
Jan Lysý
525c80bac4 Fix PHPStan warnings in lib
[MAILPOET-5751]
2023-12-13 11:48:14 +01:00
John Oleksowicz
c775a3abd2 Update pending approval message in email preview
MAILPOET-5631
2023-11-02 18:15:55 +01:00
John Oleksowicz
a3b8babde0 Add twig function to check if on dotcom
MAILPOET-5549
2023-11-01 12:24:46 +01:00
Rodrigo Primo
8a4f5c13da Add tracking for users arriving to the wizard from WooCommerce
MailPoet adds a link to the WooCommerce task list pointing to its own
welcome wizard. We want to track users that arrive to the MP wizard from
WooCommerce but at this point tracking is not enabled. So we store the
information in a setting, and send the tracking event to Mixpanel, if it
is enabled, after the user completes the wizard.

[MAILPOET-4814]
2023-01-30 15:01:42 +01:00
Jan Lysý
40f4216ff8 Add method for getting WC coupons
[MAILPOET-4761]
2023-01-30 09:36:21 +01:00
 Ján Mikláš
1e76b214ea Don't load HelpScout Beacon on Dotcom Ecommerce plan
[MAILPOET-5017]
2023-01-26 09:31:27 +01:00
Jan Jakes
926620e8f8 Ignore strict types rule in all existing files that don't have it
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
David Remer
218de96024 Fix WordPress.WP.I18n.MissingTranslatorsComment errors
[MAILPOET-4524]
2022-08-09 13:23:16 +02:00
David Remer
b05e6d414c Remove WP\Functions::__ and other translate functions
Under the new sniffer rules, those functions produce errors and, when those methods
are used, the sniffer can not properly be applied.

[MAILPOET-4524]
2022-08-09 13:23:16 +02:00
David Remer
e18b562212 Load dependencies late
When we create the templates, we are not in the WordPress environment and do not
have a connection to the database. Therefore, we need to instantiate our dependencies
later, so they get only invoked once they are needed, which is, when we are
in the WordPress environment again.

[MAILPOET-3985]
2022-06-08 15:25:41 +02:00
Rodrigo Primo
ea7aa51e39 Remove opened_stats_text() Twig function
This commit removes the opened_stats_text() Twig function as it is not
used anymore.

[MAILPOET-4102]
2022-02-16 11:19:02 +01:00
Rodrigo Primo
c21e12e82a 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]
2022-02-09 15:07:41 +01:00
Rodrigo Primo
ee6f081ab2 Add helper function to format the numbers differently in the stats email
This commit adds a helper function that will return a number with two
decimal digits if the number is smaller than 0.1 and will return a
number with one decimal digit if the number is equal to or greater than
0.1. It is used to format the numbers in the stats notification email.

[MAILPOET-3324]
2022-02-09 15:07:41 +01:00
Rodrigo Primo
3700af261f Remove duplication of methods to get stats color
The criteria used to determine the color used for clicked and opened
stats is the same, but we had one method to get the color of each stats.
This commit combines both methods into one to avoid duplication.

[MAILPOET-3324]
2022-02-09 15:07:41 +01:00
Rodrigo Primo
d359c048e3 Fix a bug in clickedStatsColor()
The method clickedStatsColor() should return different color codes
depending on the percentage of clicks (> 30%, < 30% and > 10%, < 10%).
It receives the percentage value as an absolute number. There was a bug
in this method where it was checking for values greater than 3, between
3 and 1, and smaller than 1 instead of greater than 30, between 30 and
  10, and smaller than 10.

[MAILPOET-3324]
2022-02-09 15:07:41 +01:00
Rodrigo Primo
509d97c2c0 Change the colors and text used when displaying clicked stats
[MAILPOET-3324]
2022-02-09 15:07:41 +01:00
Jan Jakes
9f790efbf0 Move plugin files to a subfolder
[MAILPOET-3988]
2022-01-18 15:30:22 +01:00