Commit Graph

738 Commits

Author SHA1 Message Date
Jan Lysý
492415f3ae Fix deprecated usage of string functions
[MAILPOET-4001]
2022-01-13 16:58:33 +01:00
Jan Lysý
09c2ce653c Fix code style by updated ruleset
[MAILPOET-3912]
2022-01-13 09:23:55 +01:00
Jan Lysý
b70e85fc48 Fix use statement for the pQuery
[MAILPOET-4025]
2021-12-15 10:02:31 +01:00
Oluwaseun Olorunsola
b5039a012b Recommend MailPoet in free users emails
[MAILPOET-3981]
2021-12-13 13:20:40 +01:00
Rostislav Wolny
b3795eab1a Ensure BC for data types in url data
Due to a bugfix in PHP8.1(https://bugs.php.net/bug.php?id=80808)
PDO now returns correctly integers where it used to return string.
In this commit ensures that data passed to URL will be passed as strings
in order to maintain backward compatibility.
[MAILPOET-3980]
2021-12-13 09:36:43 +01:00
Rostislav Wolny
df6a955f0c Fix deprecation warnings coming from pQuery library
[MAILPOET-3980]
2021-12-13 09:36:43 +01:00
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