Commit Graph

5497 Commits

Author SHA1 Message Date
Rostislav Wolny
04052d7d9c Schedule last engagement detection again for the new update
[MAILPOET-3892]
2021-11-01 10:54:43 +01:00
Rostislav Wolný
586443e13c Fix scheduling tasks on activation
[MAILPOET-2686]

Co-authored-by: brezocordero <brezo.cordero@automattic.com>
2021-11-01 10:54:43 +01:00
Rostislav Wolny
5490b9e2a2 Fix PHPStan error
We create $values array in the same method and its count is always multiple of 3
[MAILPOET-3889]
2021-10-28 15:44:18 +02:00
Rostislav Wolny
73a9bed483 Replace deprecated doctrine methods in lib directory
[MAILPOET-3889]
2021-10-28 15:44:18 +02:00
Rostislav Wolny
86e938b46e Provide PSR array cache and switch annotation reader to it
The annotation reader was using CachedReader which has been deprecated so we need to switch to PsrCachedReader
Since 2.0 doctrine/cache no longer provides implementations of caches so I also needed to implement a simple PSR array cache.
[MAILPOET-3892]
2021-10-28 15:44:18 +02:00
Rostislav Wolny
503283fa63 Provide array cache implementation
doctrine/cache 2.0 no longer provides implementations of caches. It provides only interfaces.
We need only PHP array cache so I chose to implement this simple cache instead of introducing
new cache library.
[MAILPOET-3892]
2021-10-28 15:44:18 +02:00
Jan Lysý
81bfcc4247 Remove code for backward compatibility
[MAILPOET-3427]
2021-10-27 15:45:17 +02:00
Jan Lysý
9b5576babd Add fix for inconsistent data in dynamic filters table
[MAILPOET-3427]
2021-10-27 15:45:17 +02:00
Jan Lysý
a8bb1a044b Use consistent name for parameter name in Reporter
[MAILPOET-3427]
2021-10-27 15:45:17 +02:00
Jan Lysý
8f7ef3aa51 Rename method for getting count of segments with more filters
[MAILPOET-3427]
2021-10-27 15:45:17 +02:00
Jan Lysý
6e6ba3e7a1 Use new signature of the dynamicSegmentFilterData constructor
[MAILPOET-3427]
2021-10-27 15:45:17 +02:00
Jan Lysý
cc05b945b4 Use new properties in repository
[MAILPOET-3427]
2021-10-27 15:45:17 +02:00
Jan Lysý
78e763deee Add new properties and change constructor
[MAILPOET-3427]
2021-10-27 15:45:17 +02:00
Jan Lysý
c51d5afd48 Add new columns into dynamic_segment_filters table
[MAILPOET-3427]
2021-10-27 15:45:17 +02:00
Jan Lysý
1ee7581890 Add new tracked data to Reporter
[MAILPOET-3427]
2021-10-27 15:45:17 +02:00
Jan Lysý
0af5f111be Add new function for getting count of segments with more filters
[MAILPOET-3427]
2021-10-27 15:45:17 +02:00
Jan Lysý
02ad7c9c8e Add repository for DynamicSegmentFilters
[MAILPOET-3427]
2021-10-27 15:45:17 +02:00
Pavel Dohnal
f597416837 Add a docblock to container wrapper
[MAILPOET-3792]
2021-10-27 13:29:12 +02:00
wxa
188657a5fb Move StatisticsUnsubscribeEntity creation to tests
[MAILPOET-3819]
2021-10-27 11:24:22 +02:00
wxa
046f7d58e9 Remove DynamicSegment model: deprecation period expired
[MAILPOET-3819]
2021-10-27 11:24:22 +02:00
wxa
1f924c8d2e Mark StatisticsUnsubscribes model as deprecated
[MAILPOET-3819]
2021-10-27 11:24:22 +02:00
wxa
bacfd3c4dc Remove usages of StatisticsUnsubscribes model
[MAILPOET-3819]
2021-10-27 11:24:22 +02:00
Rodrigo Primo
ba15b9b251 Move ScheduledTask::findFutureScheduledByType() to ScheduledTasksRepository
Now that all other methods that use ScheduledTask::findByTypeAndStatus()
were moved to ScheduledTasksRepository, we can move
findFutureScheduledByType() as well and delete
ScheduledTask::findByTypeAndStatus().

[MAILPOET-3845]
2021-10-26 16:50:27 +02:00
Pavel Dohnal
0d70174737 Only do validation if MSS is active
[MAILPOET-3857]
2021-10-26 16:11:32 +02:00
Pavel Dohnal
813d43f857 Validate if newsletter has an unsubscribe link
[MAILPOET-3857]
2021-10-26 16:11:32 +02:00
Pavel Dohnal
3a67210743 Load the entity for validation
[MAILPOET-3857]
2021-10-26 16:11:32 +02:00
Ján Mikláš
970eb69dc1 Revert "Replace wrong placeholders in translatable strings"
This reverts commit cc76882164.
2021-10-25 09:48:04 -03:00
Rodrigo Primo
498ceabc8c Refactor CronWorkerRunner to use Doctrine instead of Paris
[MAILPOET-3844]
2021-10-25 14:17:21 +02:00
Rodrigo Primo
2c78db9e04 Refactor ScheduledTasks::rescheduleProgressively() to use Doctrine
[MAILPOET-3844]
2021-10-25 14:17:21 +02:00
Rodrigo Primo
c6b008ba66 Refactor CronWorkerScheduler::reschedule() to use Doctrine
[MAILPOET-3844]
2021-10-25 14:17:21 +02:00
Pavel Dohnal
aec965f4f7 Refactor WooCommercePurchasesTest to Doctrine
[MAILPOET-3814]
2021-10-25 13:08:17 +02:00
Pavel Dohnal
aaa24d086b Use Doctrine in WooCommercePurchases class
[MAILPOET-3814]
2021-10-25 13:08:17 +02:00
Pavel Dohnal
69ff6072d2 Copy findLatestPerNewsletterBySubscriber to doctrine repository
[MAILPOET-3814]
2021-10-25 13:08:17 +02:00
Pavel Dohnal
bab51da527 Copy createOrUpdateByClickDataAndOrder to doctrine repository
[MAILPOET-3814]
2021-10-25 13:08:17 +02:00
Pavel Dohnal
102e333521 Use Doctrine in WooCommercePastOrders cron worker
[MAILPOET-3814]
2021-10-25 13:08:17 +02:00
Pavel Dohnal
cfa87a165d Remove old outdated code
[MAILPOET-3814]
2021-10-25 13:08:17 +02:00
wxa
cc76882164 Replace wrong placeholders in translatable strings
[MAILPOET-3863]
2021-10-25 11:48:24 +02:00
Jan Lysý
eb74c1e391 Fix application of the mailpoet_register_form_extend filter
[MAILPOET-3864]
2021-10-20 15:16:38 +02:00
wxa
43ddb4bdaa Fix 'Create a new form' link in widget
[MAILPOET-3849]
2021-10-20 10:20:01 +02:00
Jan Lysý
483dc3c7d9 Remove usage of WP function get_the_content
[MAILPOET-3861]
2021-10-20 10:09:43 +02:00
Brezo Cordero
3812d6c15e Select first form in list
[MAILPOET-3847]
2021-10-20 09:30:55 +02:00
Brezo Cordero
51e03911b8 Default to first active form if widget form id not present
[MAILPOET-3847]
2021-10-20 09:30:55 +02:00
Rostislav Wolny
04a1f501e3 Nicer formatting of re-engagement SQL query
[MAILPOET-3782]
2021-10-18 16:21:52 +02:00
Rostislav Wolny
47840f9dfc Enqueue re-engagement subscribers list by list
[MAILPOET-3782]
2021-10-18 16:21:52 +02:00
Rostislav Wolny
36dd0c8519 Fix method signature for task scheduling
[MAILPOET-3782]
2021-10-18 16:21:52 +02:00
Rostislav Wolny
799eb38f4a Unify variable naming for newsletter entity with rest of codebase
[MAILPOET-3782]
2021-10-18 16:21:52 +02:00
Rostislav Wolny
4b8abf1148 Add support for re-engagement email to scheduler worker
[MAILPOET-3782]
2021-10-18 16:21:52 +02:00
Rostislav Wolny
550077800e Use newsletter entity constants in scheduler worker
[MAILPOET-3782]
2021-10-18 16:21:52 +02:00
Rostislav Wolny
59031237fe Remove scheduled count info for re-engagement emails in listing
We schedule re-engagement emails to be send immediately after we detect some recipients so the scheduled count would be always 0.
[MAILPOET-3782]
2021-10-18 16:21:52 +02:00
Rostislav Wolny
af7c9d27ba Add condition for cases when subscribers received only one email
[MAILPOET-3782]
2021-10-18 16:21:52 +02:00