Commit Graph

332 Commits

Author SHA1 Message Date
David Remer
55880fb257 Disable auto_reload only in non development environments
[MAILPOET-4439]
2022-06-16 10:45:57 +02:00
David Remer
5b49dd0fc7 Do not autoload twig templates
Set to true auto_load will attempt to overwrite existing files, which is
to be avoided.

[MAILPOET-4439]
2022-06-16 10:45:57 +02:00
David Remer
0d4048b682 Remove WordPress from build process
[MAILPOET-3985]
2022-06-08 15:25:41 +02:00
David Remer
467ed02043 Add short doc to explain, why the methods where altered.
[MAILPOET-3985]
2022-06-08 15:25:41 +02:00
David Remer
6a7b2f3952 Try to create the temporary folder
[MAILPOET-3985]
2022-06-08 15:25:41 +02:00
David Remer
d5b25ac28f Add getTwig method
[MAILPOET-3985]
2022-06-08 15:25:41 +02:00
David Remer
4ffb4e0dc2 Rename temp folder creation method
[MAILPOET-3985]
2022-06-08 15:25:41 +02:00
David Remer
4b7ecfba94 Use newly introduced twig classes
[MAILPOET-3985]
2022-06-08 15:25:41 +02:00
David Remer
052d5e4531 Change path to cached templates
[MAILPOET-3985]
2022-06-08 15:25:41 +02:00
David Remer
382ae901cc Introduce TwigFileSystemCache
The original FileSystemCache of twig generates the key depending on PHP_VERSION.
We need to produce the same key regardless of PHP_VERSION. Therefore
TwigFileSystemCache overwrites this method.

[MAILPOET-3985]
2022-06-08 15:25:41 +02:00
David Remer
89b871775a Introduce TwigEnvironment
This commit introduces our own TwigEnvironment class which extends the original Twig\Environment.
The original class produced a different templateClass depending on the PHP version and
the selected options. As we can not rely on PHP version, this would have produced different
template hash keys in the end and Twig would have attempted to store new templates
on the disk, which we want to prevent.

[MAILPOET-3985]
2022-06-08 15:25:41 +02:00
David Remer
246268e00d Fix logic operator when detecting newsletter-editor page
[MAILPOET-4247]
2022-06-06 10:54:12 +02:00
David Remer
047040b0ed Prevent Google fonts from loading when they are disabled
[MAILPOET-4247]
2022-06-06 10:54:12 +02:00
Jan Lysý
5ab04b8b22 Remove usage constant from the old model
[MAILPOET-4338]
2022-05-19 14:18:06 +02:00
Jan Jakes
d9c47a40f2 Add permissions to manage automations
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
2c18b851e4 Add automation editor page
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
David Remer
7b33a94d37 Add set_user_role hook
[MAILPOET-2834]
2022-05-12 11:41:57 +02:00
David Remer
9bd6f29870 Add add_user_role hook to synchronizeUser
[MAILPOET-2834]
2022-05-12 11:41:57 +02:00
David Remer
acd8fbb773 Move MailPoet cron users to WordPress cron
[MAILPOET-4271]
2022-05-09 13:06:28 +02:00
Jan Lysý
c08bde077b Update symfony/dependency-injection package to v5
[MAILPOET-4227]
2022-04-27 08:57:54 +02:00
Brezo Cordero
8077322a29 Simplify the query to calculate lifetime emails
Also rename email_counts to email_count and update tests

[MAILPOET-4177]
2022-04-07 10:17:38 +02:00
Brezo Cordero
8fe323c9c7 Add new column on subscribers to store email counts
This value will store the emails received in the lifetime of a subscriber. Used for stats and deactivation.

[MAILPOET-4177]
2022-04-07 10:17:38 +02:00
David Remer
53fc49d1eb Simplify phpcs:disable comments
Additionally this commit contains a conversion from %d to %s in a query

[MAILPOET-4219]
2022-04-04 17:12:33 +02:00
David Remer
9f39843189 Sanitize incoming data according to WP sniffer
[MAILPOET-4219]
2022-04-04 17:12:33 +02:00
David Remer
cb55cae1b2 Escape SQL queries following wp org sniffs
[MAILPOET-4129]
2022-04-04 17:12:33 +02:00
David Remer
bde6c1ce65 Escape output according to sniffs
[MAILPOET-4219]
2022-04-04 17:12:33 +02:00
Sam Najian
a2ab1a3cfd Escape queries before passing to $wpdb methods
[MAILPOET-4219]
2022-04-04 17:12:33 +02:00
David Remer
a8d88beec9 Escape output according to WP sniffs
[MAILPOET-4129]
2022-04-04 17:12:33 +02:00
Rostislav Wolny
9b71a7804c Update Monolog/Monolog from v1 to v2
[MAILPOET-4175]
2022-03-28 13:49:41 +02:00
Rostislav Wolny
00b0723f96 Refactor logic for detection of translations installed from .org
[MAILPOET-4144]
2022-03-17 14:51:09 +01:00
Rostislav Wolny
fc5b25dd20 Force installing language packs updates on plugin activation
[MAILPOET-4144]
2022-03-17 14:51:09 +01:00
Rostislav Wolny
84b7ec709a Fetch .com language packs info during plugin activation
[MAILPOET-4144]
2022-03-17 14:51:09 +01:00
Rostislav Wolny
db14f851a1 Prevent installing translations from .org if they are available on .com
[MAILPOET-4144]
2022-03-17 14:51:09 +01:00
Rostislav Wolny
7791219d7d Refactor processing translations API data in two methods
[MAILPOET-4144]
2022-03-17 14:51:09 +01:00
Rostislav Wolny
a21e31ca2d Make sure translations from .org are replaced by translations from .com
When the plugin is initially installed it may download translations from .org.
The translations from .org may have a newer date then translations from .com, but are incomplete.
This change ensures that translations installed from .org are always replaced by translations from .com.
[MAILPOET-4144]
2022-03-17 14:51:09 +01:00
Rostislav Wolny
ac17700995 Hook into translation update earlier in plugin initialisation
[MAILPOET-4144]
2022-03-17 14:51:09 +01:00
Jan Lysý
885209d9a3 Fix translation loading
[MAILPOET-3808]
2022-03-17 14:51:09 +01:00
Jan Lysý
40860d1d59 Increase minimal timeout for API requests and fix comment
[MAILPOET-3808]
2022-03-17 14:51:09 +01:00
Jan Lysý
dd54518933 Change timeout for translation API requests
[MAILPOET-3808]
2022-03-17 14:51:09 +01:00
Jan Lysý
6f020342c1 Add integration test for TranslationUpdater
[MAILPOET-3808]
2022-03-17 14:51:09 +01:00
Jan Lysý
982a6ee073 Remove loading plugin translations
[MAILPOET-3808]
2022-03-17 14:51:09 +01:00
Jan Lysý
afebe36c81 Add automatic check for translations
[MAILPOET-3808]
2022-03-17 14:51:09 +01:00
Jan Lysý
75cbcacae2 Remove static usage of WP functions
[MAILPOET-3808]
2022-03-17 14:51:09 +01:00
Jan Jakes
f7866aab49 Initialize MailPoet integration for automation
[MAILPOET-4136]
2022-03-14 09:36:21 +01:00
Jan Jakes
3006804f11 Move automation engine initialization to init hook
We need to initialize it later so that automation integration
initialization hooks can be registered first.

[MAILPOET-4136]
2022-03-14 09:36:21 +01:00
Jan Jakes
da2621230d Move automation engine code under "Engine" namespace
This is to separate the engine itself from "integrations" that will be
built on top of the engine.

[MAILPOET-4136]
2022-03-14 09:36:21 +01:00
Rostislav Wolny
f6a6dc1802 Rename premium page to upgrade page
[MAILPOET-4164]
2022-02-28 16:49:26 +01:00
Jan Jakes
ddb04feef4 Add empty automation initializer
[MAILPOET-4135]
2022-02-21 09:56:26 +01:00
Jan Jakes
9dc2809462 Add automation page
[MAILPOET-4135]
2022-02-21 09:56:26 +01:00
Rostislav Wolný
2beac94aa9 Revert "Remove static usage of WP functions"
This reverts commit 1c10add392.
2022-02-16 12:49:35 +01:00