Commit Graph

732 Commits

Author SHA1 Message Date
Rostislav Wolny
699266c920 Use TrackingConfig and new tracking settings property in PHP
[MAILPOET-3185]
2021-12-06 17:03:28 +01:00
Rodrigo Primo
3373d9dc00 Add code to process the new link:subscription_re_engage_url shortcode
[MAILPOET-3976]
2021-11-25 14:55:14 +01:00
Rostislav Wolny
bbb23e4f37 Update also newsletter status when completing sending task
[MAILPOET-3962]
2021-11-23 13:39:51 +01:00
Rostislav Wolny
c8111a7a85 Fix setting processed at when finishing sending within resume
[MAILPOET-3962]
2021-11-23 13:39:51 +01:00
Pavel Dohnal
78d748948b Make sure the parentheses are correct
[MAILPOET-3938]
2021-11-16 09:54:18 +01:00
Pavel Dohnal
5f1e6c8bd2 Make sure the query always returns at most 1 row
[MAILPOET-3938]
2021-11-16 09:54:18 +01:00
Rodrigo Primo
ae99fe3be2 Use Doctrine references when saving links
This commit changes the code of the method
\MailPoet\Newsletter\Links\Links::save() to use Doctrine references
instead of full entities when getting a newsletter and sending queue
entities to save the related links.

We don't need the full entities here, and getting a full entity for the
sending queue was generating an error in the
testItLogsErrorWhenNewlyRenderedNewsletterBodyIsInvalid() integration
test (see the description of PR
https://github.com/mailpoet/mailpoet/pull/3784 for more details).

To be able to get the reference, it was necessary to add a helper method
called getReference() to \MailPoet\Doctrine\Repository.

[MAILPOET-3816]
2021-11-15 13:03:47 +01:00
Rodrigo Primo
d9296d86fd Replace NewsletterLink with NewsletterLinkEntity in the class Links
It was also necessary to update two NewsletterTest tests, as after the
change to Links::save(), having a queue ID set became mandatory (before
it was not and one was not set properly in the mock SendingQueue object).

[MAILPOET-3816]
2021-11-15 13:03:47 +01:00
Rodrigo Primo
612eb1073d Move NewstetterLink properties to NewsletterLinkEntity
Doing this as part of the task to deprecated old Paris models
(NewsletterLink) and use Doctrine entities instead
(NewslleterLinkEntity).

[MAILPOET-3816]
2021-11-15 13:03:47 +01:00
Pavel Dohnal
ee00f03ed3 Refactor pause/resume to doctrine
[MAILPOET-3876]
2021-11-10 12:49:48 +01:00
Brezo Cordero
534b8f085d Do not replace quotes with Unicode in ALC titles
[MAILPOET-3660]
2021-11-08 11:12:10 +01:00
Jan Lysý
69da013483 Fix condition in Scheduler
[MAILPOET-3818]
2021-11-03 13:34:35 +01:00
Jan Lysý
fdd8926991 Add check if scheduled time is out of MySQL timestamp range
[MAILPOET-3818]
2021-11-03 13:34:35 +01:00
Brezo Cordero
21b9ae9f2e Show re-engagement emails notice after saving
[MAILPOET-3743]
2021-11-02 09:12:02 +01:00
Rostislav Wolny
73a9bed483 Replace deprecated doctrine methods in lib directory
[MAILPOET-3889]
2021-10-28 15:44:18 +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
Jan Lysý
483dc3c7d9 Remove usage of WP function get_the_content
[MAILPOET-3861]
2021-10-20 10:09:43 +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
af7c9d27ba Add condition for cases when subscribers received only one email
[MAILPOET-3782]
2021-10-18 16:21:52 +02:00
Rostislav Wolny
9aae441d99 Update queue counts or delete scheduled task
[MAILPOET-3782]
2021-10-18 16:21:52 +02:00
Rostislav Wolny
bafb41c94e Refactor re-engagement scheduling code to more methods
[MAILPOET-3782]
2021-10-18 16:21:52 +02:00
Rostislav Wolny
3c5a368c2c Add scheduling of re-engagement emails
[MAILPOET-3782]
2021-10-18 16:21:52 +02:00
Rostislav Wolny
23278bd785 Add re-engagement email scheduling cron job and dummy scheduler
[MAILPOET-3782]
2021-10-18 16:21:52 +02:00
Jan Lysý
4a3aecbf5c Use WP functions to get content and excerpt
[MAILPOET-3671]
2021-10-04 14:37:43 +02:00
Rodrigo Primo
e69a3f9a53 Migrate method findCompletedByType() to Doctrine
[MAILPOET-2996]
2021-10-04 13:25:44 +02:00
Jan Lysý
05f0a6ad19 Improve replacing paragraph class
[MAILPOET-3474]
2021-10-04 10:19:39 +02:00
Jan Lysý
93674929b0 Add spacing at end of the paragraph when next element is heading
[MAILPOET-3474]
2021-10-04 10:19:39 +02:00
Jan Lysý
e2c1534ea9 Replace paragraph class when other is defined
[MAILPOET-3474]
2021-10-04 10:19:39 +02:00
Pavel Dohnal
ac3625e434 Create listings tab for re-engagement emails
[MAILPOET-3763]
2021-09-29 14:17:57 +02:00
Rodrigo Primo
f8e8a26d52 Fix error when creating ScheduledTasksRepository::findByTypeAndStatus()
When refactoring ScheduledTask::findByTypeAndStatus() to
ScheduledTasksRepository::findByTypeAndStatus(). During the process, I
mistankenly converted `$query->whereGt('scheduled_at', $now);` to
`$queryBuilder->andWhere('st.scheduledAt >= :now');`. It should be `>`
instead of `>=`.

[MAILPOET-2996]
2021-09-29 13:53:27 +02:00
Rodrigo Primo
65eef3dfbe Migrate methods findDueByType() and findRunningByType() to Doctrine
[MAILPOET-2996]
2021-09-29 13:53:27 +02:00
Brezo Cordero
df5cab2060 Fix flaky schedule welcome email test
[MAILPOET-3793]
2021-09-29 09:59:25 +02:00
Brezo Cordero
d37f0642d5 Fix flaky schedule automatic email test
[MAILPOET-3793]
2021-09-29 09:59:25 +02:00
Rodrigo Primo
97d177013f Refactor \MailPoet\Models\Newsletter::getArchives() to Doctrine
[MAILPOET-3629]
2021-09-20 14:01:34 +02:00
Pavel Dohnal
21839fc30b Fix indentation of multiline function declarations
[MAILPOET-3732]
2021-09-17 12:17:36 +02:00
Pavel Dohnal
cdda3480ca Make all constructor signatures multiline
[MAILPOET-3732]
2021-09-16 14:19:40 +02:00
Jan Lysý
ccedd3a112 Add count of bounced emails into API response
[MAILPOET-3766]
2021-09-14 15:59:50 +02:00
Pavel Dohnal
2892a23deb Fix machine opens counter
[MAILPOET-3797]
2021-09-14 15:58:30 +02:00
Pavel Dohnal
250b818be6 Remove unnecessary join
[MAILPOET-3765]
2021-09-13 10:19:15 +02:00
Pavel Dohnal
a303b4f04e Process queues to save statistics
[MAILPOET-3765]
2021-09-13 10:19:15 +02:00
Rostislav Wolny
1c4eb15f93 Refactor CronWorkerScheduler to Doctrine
[MAILPOET-3726]
2021-09-08 16:12:37 +02:00
Brezo Cordero
1de3aef76f Use data factories on tests
[MAILPOET-3637]
2021-09-06 10:08:09 +02:00
Brezo Cordero
69d9da9f17 Removed unused variable on ViewBrowserRenderer
[MAILPOET-3673]
2021-09-06 10:08:09 +02:00
Brezo Cordero
9d9efccd98 Refactor ViewInBrowser to Doctrine
Use NewsletterEntity and NewslettersRepository instead of MailPoet\Models\Newsletter.

[MAILPOET-3673]
2021-09-06 10:08:09 +02:00
Pavel Dohnal
a53a680e8c Make naming more consistent
[MAILPOET-3740]
2021-08-30 14:04:29 +02:00
Pavel Dohnal
464f23c82b Display machine opens
[MAILPOET-3740]
2021-08-30 14:04:29 +02:00
Jan Lysý
ed46c48706 Calculate statistics only from data with type human
[MAILPOET-3736]
2021-08-23 16:37:59 +02:00