Commit Graph

183 Commits

Author SHA1 Message Date
Rodrigo Primo
18d34202a8 Remove remaining uses of the ScheduledTaskSubscriber model from Sending
[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
8b4e747499 Refactor Sending::saveSubscriberError() to use Doctrine instead of Paris
[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
fefaf174cd Refactor Sending::removeSubscribers() to use Doctrine instead of Paris
[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
59d4ce3ba2 Update checkCompleted() to also change the processedAt field
This commit updates the method ScheduledTaskSubscribersRepository::checkCompleted() to update the processedAt field of the Scheduled Task. The method was added in f62d9b4167 and I believe it is meant to be a replacement to \MailPoet\Tasks\Subscribers::checkCompleted(). The original method updates the processedAt field, so I'm assuming the new method should update as well. I found this while working on refactoring \MailPoet\Tasks\Sending::removeSubscribers() to use Doctrine as this method calls \MailPoet\Tasks\Subscribers::checkCompleted() internaly.

[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
8fd8b8f193 Refactor Sending::setSubscribers() to use Doctrine instead of Paris
[MAILPOET-4368]
2023-10-25 10:31:45 +02:00
John Oleksowicz
7f82010893 Add comment explaining reasoning for which HTML is allowed in titles
MAILPOET-5632
2023-10-18 14:40:32 +02:00
John Oleksowicz
dae1cb19a8 Use toString instead of html
The content saved to the database already encodes content that needs
encoding, e.g. <script> tags. The problem with pQuery's `html` method is
 it decodes everything. By using toString instead, we should be getting
 the same contents that were saved to the database.

MAILPOET-5632
2023-10-18 14:40:32 +02:00
John Oleksowicz
efc80b0476 Filter out bad HTML in ALC post titles
MAILPOET-5632
2023-10-18 14:40:32 +02:00
John Oleksowicz
bbb1a133fb Don't allow saving of lookup data to throw unhandled errors
It's not a critical error if we aren't able to save this lookup data,
and we wouldn't want it to interfere with the sending of a newsletter,
but we should log it as an error for debugging purposes.

MAILPOET-5625
2023-10-13 11:21:42 +02:00
John Oleksowicz
12362c0399 Update filter interface for lookup data
This method is intended to store the actual names of things that might
change or be deleted in the future, so we can include accurate
information when showing what the snapshot of the filter was at the time
.

MAILPOET-5625
2023-10-13 11:21:42 +02:00
Jan Lysý
899b68f2df Remove setting click_id to zero and keep the old one
Setting newsletter_id and click_id blocked deleting newsletters due to the unique index.
[MAILPOET-5607]
2023-09-26 01:52:19 -07:00
Rostislav Wolny
69a87e8146 Apply editor content styles in the email renderer
Add proof of concept for applying additional CSS in renderer
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
Rostislav Wolny
46a481ec24 Add email renderer and template to the renderer engine
In this commit, I copied the code for processing the rendering of emails
from the current renderer.
This will allow us to use different base templates and styles.
Ideally, we should be able to add hooks and reuse the renderer from the engine namespace in
the current renderer.
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
John Oleksowicz
0e770ed649 Use CarbonImmutable instead of Carbon
MAILPOET-5574
2023-09-11 13:49:57 +02:00
John Oleksowicz
000cb5e6d5 Add limit to mailpoet_archive shortcode
MAILPOET-5574
2023-09-11 13:49:57 +02:00
John Oleksowicz
ec71b44648 Add ability to filter mailpoet_archive by subject
MAILPOET-5574
2023-09-11 13:49:57 +02:00
John Oleksowicz
a0c1a137d6 Update mailpoet_archive to accept date params
MAILPOET-5574
2023-09-11 13:49:57 +02:00
David Remer
7ac2065b1a Track purchases regardless of status but return revenue status correctly
When we apply this commit every purchase will be tracked. When the shop manager updates an order
the status will be updated. For the statistics it will only return values for purchases with
the 'completed' status

[MAILPOET-5485]
2023-09-11 12:14:33 +02:00
John Oleksowicz
bb7a98ad82 Save filter segment data to queue at send time
MAILPOET-5509
2023-08-31 14:16:10 +02:00
Rostislav Wolny
68e833f80c Refactor email editor PHP and JS code to follow automations namespacing
[MAILPOET-5365]
2023-08-24 15:44:34 +02:00
Rostislav Wolny
3003e7594f Temporarily skip validation of email created via Gutenberg
[MAILPOET-5365]
2023-08-24 15:44:34 +02:00
Rostislav Wolny
fc2bbda9a2 Add dummy email body renderer for new editor
[MAILPOET-5365]
2023-08-24 15:44:34 +02:00
Rostislav Wolny
ba23b5f224 Refactor email body rendering into a separate class
[MAILPOET-5365]
2023-08-24 15:44:34 +02:00
Rostislav Wolny
d845414e4c Open standard emails created in the new editor in the new editor
[MAILPOET-5365]
2023-08-24 15:44:34 +02:00
Rostislav Wolny
61d6e41fc7 Duplicate associated post when duplicating newsletter
[MAILPOET-5365]
2023-08-24 15:44:34 +02:00
Rostislav Wolny
3ff4ba0c86 Delete WP Posts when deleting Newsletter Entities
[MAILPOET-5365]
2023-08-24 15:44:34 +02:00
David Remer
5649dd22bb Do not delete revenue, but update newsletter_id and click_id
[MAILPEOT-5486]
2023-08-22 10:19:37 +02:00
Jan Jakes
9392c6eb85 Remove previous hotfixes of queue ID fallback causing issues in some cases
Originally, this was done in an IF: 32f7d7771f
Then another hotfix added here: 116ee51497

[MAILPOET-5206]
2023-08-16 12:47:06 +02:00
Jan Jakes
939ecab06f Remove fallback to fetch any sending queue for a preview when no queue ID set
[MAILPOET-5206]
2023-08-16 12:47:06 +02:00
Jan Lysý
631f71957c Add support default value for subscriber's custom fields shortcode
[MAILPOET-5463]
2023-07-14 13:26:10 +02:00
Rodrigo Primo
6a438f68d8 Remove duplicated method in ScheduledTaskSubscribersRepository
[MAILPOET-5422]
2023-06-23 16:59:32 +02:00
David Remer
702b695de9 Allow the usage of only from or only to
[MAILPOET-5088]
2023-06-15 12:25:12 +02:00
David Remer
5710796fe9 Add date between options to statistics and select which statistics to grab in batch
[MAILPOET-5090]
2023-06-15 12:25:12 +02:00
David Remer
6d8095d8b5 Render AbandonedCart in transactional and automation emails
[MAILPOET-4934]
2023-05-15 08:19:19 +02:00
David Remer
50827706fb Add product_ids for abandoned cart to email
[MAILPOET-4934]
2023-05-15 08:19:19 +02:00
David Remer
a69b2ee7dc Query for tasks by type and subscriber
[MAILPOET-4934]
2023-05-15 08:19:19 +02:00
Brezo Cordero
f3cd33b3c9 Return same data object on empty or null subscriber
If subscriber is empty we want to return the same token as if it is null.

[MAILPOET-5248]
2023-05-01 13:15:04 +02:00
Rodrigo Primo
5a85390655 Replace remaining calls to utf8_encode() with mb_convert_encoding()
In the previous commit, I removed all calls to the deprecated
utf8_encode() that seemed safe to remove. In this commit, I'm replacing
the calls to this function that I'm not sure if are same to remove or
not with mb_convert_encoding().

mb_convert_encoding() requires the extension mbstring to be enabled. It
should be enabled on most PHP install but not all. We are already using
mbstring functions in our code base and we provide a polyfill for PHP
installs where the extension is not enabled
(62bb75ed91/mailpoet/prefixer/composer.json (L25)).
So it should be safe to use it.

[MAILPOET-4865]
2023-04-28 10:26:03 +02:00
Jan Jakes
69f21814e3 Rename "transactional" email type to "automation_transactional"
[MAILPOET-5258]
2023-04-24 09:54:08 +03:00
Rostislav Wolny
f6b752e807 Revert email links sanitization on save
[MAILPOET-5254]
2023-04-21 11:14:25 +02:00
Pavel Dohnal
8028bd3e95 Use discouraged function directly
We need to add a warning so that we know for sure
that this piece of risky code gets reviewed by a human and consciously ignore the warning

[MAILPOET-5245]
2023-04-20 12:00:29 +02:00
Jan Lysý
4bcf413dbe Fix minute scheduling for post notifications
We recently added minute scheduling in UI, but we forgot to update PostNotificationScheduler.
It caused calculating float number for hours and PN were not scheduled.
[MAILPOET-5244]
2023-04-19 15:32:28 +02:00
Rostislav Wolny
fa59c2c184 Sanitize socialIcon and image links in emails on save
[MAILPOET-5235]
2023-04-17 14:17:49 +02:00
Brezo Cordero
dccd729c2f Sanitize values in Button block template
[MAILPOET-5235]
2023-04-17 14:17:49 +02:00
David Remer
59bbe31433 Allow transactional emails
[MAILPOET-4999]
2023-04-17 13:59:39 +02:00
 Ján Mikláš
63be8969f3 Improve strings based on translators' feedback
[MAILPOET-5201]
2023-04-10 13:03:18 +02:00
Sam Najian
397232e932 Set status of scheduled_task to invalid if it has not subs
[MAILPOET-5134]
2023-04-03 11:53:49 +02:00
David Remer
47ca0d926b Exempt <hr> from being stripped when display type is full
[MAILPOET-5114]
2023-03-28 15:20:10 +02:00
Jan Lysý
2547f4bfbd Replace old model usages by Doctrine
[MAILPOET-4303]
2023-03-22 09:20:11 +01:00
Jan Lysý
2ead4214cd Move query with inserting task subscribers to repository
[MAILPOET-4303]
2023-03-22 09:20:11 +01:00