Rostislav Wolny
6a86dfc7c0
Throw an exception when preprocessing a newsletter without a queue
...
The goal of this commit is to change the preProcessNewsletter method
to return false only in case when it deleted the newsletter and
all associated entities. So that we know for sure that false means all was deleted.
[MAILPOET-5880]
2024-02-05 15:16:11 +01:00
Jan Jakes
d6da2af55b
Extract newsletter bulk delete logic to a controller
...
Repositories shouldn't inject other repositories. Also, this solves circular DI dependency.
[MAILPOET-5845]
2024-02-02 12:48:40 +01:00
Jan Jakes
586ef334b0
Rewrite SendingQueue\Tasks\Newsletter::prepareNewsletterForSending() using Doctrine
...
[MAILPOET-5682]
2024-01-12 13:25:46 +01:00
Jan Jakes
ec792b30df
Rewrite SendingQueue\Tasks\Newsletter::preProcessNewsletter() using Doctrine
...
[MAILPOET-5682]
2024-01-12 13:25:46 +01:00
Jan Jakes
16b2817ce6
Rewrite SendingQueue\Tasks\Newsletter::getNewsletterFromQueue() using Doctrine
...
[MAILPOET-5682]
2024-01-12 13:25:46 +01:00
Oluwaseun Olorunsola
c76c8f2abb
Save the correct datetime value for newsletter sentAt column
...
We don't need to use the value from `processedAt` here since we can rightfully use the current datetime value
Also, I found out `processedAt` is usually null here for standard newsletters which cause new Carbon to use the server datetime settings
MAILPOET-5795
2023-12-25 21:38:02 +01:00
Jan Jakes
b05bc86223
Remove usages of MailPoet\Tasks\Sending from renderer
...
[MAILPOET-4375]
2023-11-02 12:53:36 +01:00
Rodrigo Primo
2736348feb
Remove remaining use of SendingQueue model in Newsletter class
...
As far as I could test, calling validate() directly is not necessary.
The call to $sendingTask->save() right above calls validate() internaly
and then any errors will be returned by $sendingTask->getErrors().
I added a integration test that seems to confirm this interpretation.
[MAILPOET-4693]
2023-10-30 10:11:11 +01:00
Jan Lysý
998a1ef1f0
Add method for sending recovery from an invalid state
...
[MAILPOET-4891]
2023-09-14 21:03:08 +02:00
John Oleksowicz
bb7a98ad82
Save filter segment data to queue at send time
...
MAILPOET-5509
2023-08-31 14:16:10 +02:00
Rodrigo Primo
7c4a84aaf4
Remove notices for hooks that were deprecated over six months ago
...
[MAILPOET-5272]
2023-04-28 06:05:29 +01:00
Sam Najian
9ca259d1d0
Exclude corrupt emails when fetching queue newsletters
...
[MAILPOET-4983]
2023-03-01 17:46:22 +01:00
John Oleksowicz
8c0854ab47
Consider image src when calculating campaignIds
...
MAILPOET-5034
2023-02-26 15:20:48 +01:00
John Oleksowicz
49c85c05ed
Move campaignId generation to more logical place
...
MAILPOET-5034
2023-02-26 15:20:48 +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
Rodrigo Primo
54ea394f82
Deprecate filter as part of a Doctrine refactor
...
This commit deprecates the filter
mailpoet_sending_newsletter_render_after and replaces it with
mailpoet_sending_newsletter_render_after_pre_process. This was necessary
because as part of a Doctrine refactor one of the parameters passed to
the old filter changed from a Newsletter model to a Newsletter entity.
[MAILPOET-4680]
2022-10-04 14:41:00 +02:00
Rodrigo Primo
d39440f1dc
Refactor Newsletter::preProcessNewsletter() to use Doctrine
...
This commit also removes almost all the usages of the old Newsletter
model from NewsletterTest.
[MAILPOET-4680]
2022-10-04 14:41:00 +02:00
Rodrigo Primo
095cddc67e
Change Posts::getAlcPostsCount() to use Doctine instead of Paris
...
[MAILPOET-4680]
2022-10-04 14:41:00 +02:00
Jan Lysý
58d32a68fb
Use processedAt from the correct model
...
[MAILPOET-4685]
2022-09-29 15:19:09 -03:00
Rodrigo Primo
f578f3f16a
Remove method Tasks\Newsletter\getNewsletterSegments()
...
This method was used only once inside SendingQueue and it can be
replaced by NewsletterEntity::getSegmentIds() to simplify the code.
[MAILPOET-4363]
2022-09-21 16:03:21 +02:00
Rodrigo Primo
d79cecbef2
Replace some of the uses of SendingQueue model with Doctrine
...
[MAILPOET-4363]
2022-09-21 16:03:21 +02:00
Rodrigo Primo
ccbdbd3e93
Refactor getNewsletterFromQueue() to use Doctrine instead of Paris
...
[MAILPOET-4363]
2022-09-21 16:03:21 +02:00
Rodrigo Primo
4ca656a217
Rename $queue to $sendingTask
...
Doing this for consistency and to make it more clear that $sendingTask
contains an instance of \MailPoet\Tasks\Sending and not an instance of
\MailPoet\Models\SendingQueue.
[MAILPOET-4363]
2022-09-21 16:03:21 +02:00
Rodrigo Primo
a7d0ad6568
Set the type of all the Newsletter parameters that use the Sending class
...
[MAILPOET-4363]
2022-09-21 16:03:21 +02:00
Rodrigo Primo
168ce20a40
Use NewsletterEntity instead of Newsletter model in Links
...
[MAILPOET-4363]
2022-09-21 16:03:21 +02:00
Rodrigo Primo
9a92068d5b
Refactor Newsletter to use Doctrine instead of the Newsletter model
...
[MAILPOET-4363]
2022-09-21 16:03:21 +02:00
Rodrigo Primo
f6afe987c8
Add return type declaration for Newsletter::prepareNewsletterForSending()
...
[MAILPOET-4363]
2022-09-21 16:03:21 +02:00
Rodrigo Primo
68c3277195
Replace Subscriber model with Doctrine in Tasks\Newsletter
...
[MAILPOET-4363]
2022-09-21 16:03:21 +02:00
Rodrigo Primo
fd0acbd6cf
Refactor Newsletter to use Doctrine instead of the NewsletterSegment model
...
[MAILPOET-4363]
2022-09-21 16:03:21 +02:00
Rodrigo Primo
05664a0c6a
Refactor markNewsletterAsSent() to use Doctrine instead of Paris
...
[MAILPOET-4363]
2022-09-21 16:03:21 +02:00
Rodrigo Primo
538647946e
Refactor GATracking to use Doctrine instead of Paris
...
The test class was also refactored.
[MAILPOET-4592]
2022-09-14 10:38:01 +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
Rodrigo Primo
261f2eaa25
Replace Paris models with Doctrine entities in Shortcodes
...
[MAILPOET-4364]
2022-08-04 10:55:03 +02:00
Sam Najian
fb49ce5ac4
Adjust usage of Renderer::render in SendingQueue\Tasks::Newsletter
...
[MAILPOET-4360]
2022-07-14 13:13:47 +02:00
Rostislav Wolny
9b71a7804c
Update Monolog/Monolog from v1 to v2
...
[MAILPOET-4175]
2022-03-28 13:49:41 +02:00
Jan Lysý
82e05dfe0f
Add fixes for better compatibility with PHP8.1
...
[MAILPOET-4015]
2022-03-14 09:38:20 +01:00
Jan Jakes
9f790efbf0
Move plugin files to a subfolder
...
[MAILPOET-3988]
2022-01-18 15:30:22 +01:00