Commit Graph

202 Commits

Author SHA1 Message Date
Rostislav Wolny
b8b5696ab1 Use campaign name if available in newsletters listing in segment editor
[MAILPOET-5646]
2024-01-08 12:04:06 +05:00
Rostislav Wolny
6607b2945f Allow sorting by name + subject in newsletters listing
[MAILPOET-5646]
2024-01-08 12:04:06 +05:00
Rostislav Wolny
f7a2cfc5b7 Fetch campaign titles from wp_posts in newsletters listing
[MAILPOET-5646]
2024-01-08 12:04:06 +05:00
Rostislav Wolny
8be034822e Add minimalistic WpPostEntity for fetching basic post data for listing
[MAILPOET-5646]
2024-01-08 12:04:06 +05:00
Oluwaseun Olorunsola
639d779088 Unify ProcessedAt timezone
Fix a problem in the codebase where we create, schedule and update newsletters in the user time zone, but we set the ProcessedAt with another timezone

Also, `Carbon::createFromTimestamp($this->wp->currentTime('mysql'))` is not a valid date.
It would return date: '1970-01-01 00:35:29.000000'

MAILPOET-5795
2023-12-25 21:38:02 +01:00
Pavel Dohnal
79c3b8907a Fix emoji encoding
[MAILPOET-5283]
2023-12-19 13:36:17 +01:00
Jan Lysý
525c80bac4 Fix PHPStan warnings in lib
[MAILPOET-5751]
2023-12-13 11:48:14 +01:00
Oluwaseun Olorunsola
65de203ea3 Fix fetching standard newsletters and post-notification history items
MAILPOET-5698
2023-12-11 10:58:22 +01:00
Jan Lysý
f1ffc77bf3 Set SendingQueue default counts for welcome emails
After performance optimization in Sending::updateCount() there was a bug when the min function set processed count back to zero.
[MAILPOET-5719]
2023-12-04 16:04:11 +01:00
Jan Lysý
941abc328a Set SendingQueue default counts for automatic emails
After performance optimization in Sending::updateCount() there was a bug when the min function set processed count back to zero.
[MAILPOET-5719]
2023-12-04 16:04:11 +01:00
Jan Jakes
469bdebf9c Use the new detach helper in other batch delete use cases
[MAILPOET-5745]
2023-12-04 12:13:51 +01:00
Jan Jakes
45f5803293 Sync bulk deletes of scheduled task subscribers to entity manager
Fixes: https://github.com/mailpoet/mailpoet/issues/5281

[MAILPOET-5745]
2023-12-04 12:13:51 +01:00
Jan Jakes
2a1245bd8a Remove SendingQueueEntity::$subscribers
This doesn't seem to be used anywhere. For scheduled task subscribers, we have
ScheduledTaskEntity::$subscribers collection.

[MAILPOET-4375]
2023-11-02 12:53:36 +01:00
Jan Jakes
519407bbc8 Call flush() in SendingQueuesRepository::updateCounts()
[MAILPOET-4375]
2023-11-02 12:53:36 +01:00
Jan Jakes
1ef88a5fb5 Rewrite Scheduler::processPostNotificationNewsletter() using Doctrine
[MAILPOET-4375]
2023-11-02 12:53:36 +01:00
Jan Jakes
b05bc86223 Remove usages of MailPoet\Tasks\Sending from renderer
[MAILPOET-4375]
2023-11-02 12:53:36 +01:00
Jan Jakes
b42d579b67 Remove usages of MailPoet\Tasks\Sending from welcome scheduler
[MAILPOET-4375]
2023-11-02 12:53:36 +01:00
Jan Jakes
09abbe2246 Remove usages of MailPoet\Tasks\Sending from automation email scheduler
[MAILPOET-4375]
2023-11-02 12:53:36 +01:00
Jan Jakes
457dab01fa Remove usages of MailPoet\Tasks\Sending from reengagement scheduler
[MAILPOET-4375]
2023-11-02 12:53:36 +01:00
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