Commit Graph

78 Commits

Author SHA1 Message Date
Jan Jakes
4e1200e887 Sort email types and mark legacy ones
[MAILPOET-5779]
2024-01-10 19:12:39 +05:00
Rostislav Wolny
966014d71d Improve name of a getter for campaign name or subject on NewsletterEntity
[MAILPOET-5646]
2024-01-08 12:04:06 +05:00
Rostislav Wolny
4734aafef5 Mark WpPostEntity as read-only
Read-only was added to prevent using the entity for modifying post
data.
We want to allow modifying posts only via WP functions so that we don't skip any hooks etc.
[MAILPOET-5646]
2024-01-08 12:04:06 +05:00
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
8be034822e Add minimalistic WpPostEntity for fetching basic post data for listing
[MAILPOET-5646]
2024-01-08 12:04:06 +05:00
Rostislav Wolny
1565151179 Show the campaign name alongside the subject in standard emails listing
[MAILPOET-5646]
2024-01-08 12:04:06 +05:00
Jan Lysý
525c80bac4 Fix PHPStan warnings in lib
[MAILPOET-5751]
2023-12-13 11:48:14 +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
8b01360627 Use orphan removal for scheduled task subscriber entity
It is a connecting entity between task and subscriber, and it makes no sense
to keep without either of them. This could prevent some partial-delete bugs.

[MAILPOET-4375]
2023-11-02 12:53:36 +01:00
Rodrigo Primo
d4a80c7230 Move SendingQueueEntity::toArray() to SendingQueuesResponseBuilder::build()
Based on a suggestion during the review of the PR, it was decided that
it makes more sense for the code that was created as
SendingQueueEntity::toArray() tp be moved to
SendingQueuesResponseBuilder::build(). It is used only to build the
format that is send in the API response.

[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
69736c5e83 Fix typo in error message
[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
dc1cee5118 Replace Newsletter model with NewsletterEntity in SendingQueue
This was the easiest way to fix failing integration tests related to
updating some Sending methods to use Doctrine instead of Paris. Using
Paris in SendingQueue to update the database was creating a state where
Doctrine had stale data and this was causing the tests to fail.

[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
b252043dac Refactor Sending::getSubscribers() to use Doctrine instead of Paris
[MAILPOET-4368]
2023-10-25 10:31:45 +02:00
John Oleksowicz
cce390688c Add convenience methods for param retrieval
MAILPOET-5625
2023-10-13 11:21:42 +02:00
John Oleksowicz
b19d067aa0 Make newsletters inherit filter segment ID
MAILPOET-5511
2023-10-03 13:09:11 +02:00
David Remer
bba7786e7e Store current order status in revenue statistics
[MAILPOET-5485]
2023-09-11 12:14:33 +02:00
David Remer
d7885621b3 Fix status variable
[MAILPOET-5555]
2023-09-06 14:45:45 +02:00
John Oleksowicz
5b39092cb6 Add newsletter option for filter segment id
MAILPOET-5509
2023-08-31 14:16:10 +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
e6e20e3159 Save association to WP post with newsletter
This commit adds a simple implementation of ensuring the mailpoet_email post type
has associated NewsletterEntity.
In the future we will need to add support also for saving additional data for
newsletters (subject, sending settings).
[MAILPOET-5365]
2023-08-24 15:44:34 +02:00
Rostislav Wolny
7d99556683 Add DB migration and wpPostId to NewsletterEntity
The email body will be stored as a wp_post, but for mailpoet specific attributes
we will use the current DB structure so that we can easy integrate emails edited in the new editor.
[MAILPOET-5365]
2023-08-24 15:44:34 +02:00
alex-mpoet
a5a7966663 Fix filterData reference in DynamicSegmentFilterData
[MAILPOET-5505]
2023-08-07 10:21:33 -05:00
John Oleksowicz
a7d260ac2e Refactor strings to constants/enums
MAILPOET-4996
2023-08-07 12:03:49 +02:00
John Oleksowicz
5eeee574b2 Extract strings to constants
MAILPOET-4991
2023-07-30 19:20:09 +02:00
John Oleksowicz
251dcdc6fb Add filters for automations events
MAILPOET-5003
2023-07-12 11:10:18 +02:00
John Oleksowicz
b018918bc4 Extract (soon to be) shared text field operators
MAILPOET-4990
2023-06-28 15:14:03 +02:00
John Oleksowicz
1e82378df2 Add new tracking columns
MAILPOET-4998
2023-06-22 15:29:22 +02:00
Jan Jakes
ddfdbb23dc Add automation field for subscriber lists
[MAILPOET-5172]
2023-05-17 12:36:05 +02:00
John Oleksowicz
e636537580 Add ability to duplicate dynamic segments
MAILPOET-4635
2023-05-15 13:48:41 +02:00
Brezo Cordero
bf4a2ac287 Add subscriber status changed hook
This PR adds a new hook and notification when the subscriber status changes. It will be used by AutomateWoo integration.

[MAILPOET-4230]
2023-05-15 12:04:24 +02:00
Jan Lysý
2ef78b1bba Add getter for specific subscriberCustomField entity in relation
[MAILPOET-5246]
2023-05-03 11:31:24 +02:00
David Remer
ca3487abee Introduce Automation notification email type
[PREMIUM-223]
2023-04-27 13:40:10 +02:00
Jan Jakes
69f21814e3 Rename "transactional" email type to "automation_transactional"
[MAILPOET-5258]
2023-04-24 09:54:08 +03:00
Oluwaseun Olorunsola
ec987cbc4e Fix errors in 3rd party lib
MAILPOET-5239
2023-04-19 14:47:38 +01:00
David Remer
18baff3888 Add type transactional
[MAILPOET-4999]
2023-04-17 13:59:39 +02:00
Rodrigo Primo
c507229dd2 Add unsubscribe API method
It can be used by calling:

```
$mailpoet_api = \MailPoet\API\API::MP('v1');
$mailpoet_api->unsubscribe($subscriberId);
```

[MAILPOET-5152]
2023-03-27 19:25:49 +02:00
Jan Lysý
26a85458a5 Remove usage Sending::createFromQueue from Scheduler test
[MAILPOET-4369]
2023-03-02 12:39:35 +02:00
Sam Najian
ddd89e70ed Add context and raw message to mailpoet_logs
[MAILPOET-4983]
2023-03-01 17:46:22 +01:00
Sam Najian
976c374cb7 Catch exception when processing coupon block throws
When processing coupon block throws, the exception is
caught, custom exception is thrown and the newsletter status
is updated

[MAILPOET-4983]
2023-03-01 17:46:22 +01:00
Sam Najian
05e941e449 Allow dynamic genration of coupon code for some newsletters
Those newsletters that allow updating their body html should
persist the couponId along side the Coupon block settings so
that on the next rendering attempt the same coupon code is
used

[MAILPOET-4763]
2023-01-30 12:46:38 +01:00
Oluwaseun Olorunsola
d19f5dc732 Add ConfirmationEmailCustomizer class and confirmation email template
MAILPOET-4649
2022-12-15 18:15:01 +01:00
Sam Najian
4bcd4a2cf2 Add single const to expose shortcodes for unsubscribe link
[MAILPOET-4862]
2022-12-07 10:52:07 +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
Jan Jakes
c67c58709b Unify spacing of declare statements
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
Rostislav Wolny
842f435976 Add default value for method to StatisticsUnsubscribeEntity
When entity is created the default value is not set and it may causes
failures when it is not set additionally.
This commit sets default value and also defines a constant for the default value.
[PREMIUM-211]
2022-11-28 18:21:52 +01:00
Sam Najian
461df1a560 Adjust strict_types & method typehint based on PR feedback
[MAILPOET-4733]
2022-11-25 14:51:57 +01:00
Sam Najian
735d33d05b Add method of tracking when tracking unsubscriptions
[MAILPOET-4733]
2022-11-25 14:51:57 +01:00
Sam Najian
90c8e5b2c9 Introduce method column to statistics_unsubscribes table
[MAILPOET-4733]
2022-11-25 14:51:57 +01:00
Oluwaseun Olorunsola
8b922681b6 Use boolean instead of integer for displayInManageSubscriptionPage column
MAILPOET-4669
2022-11-21 15:21:29 +01:00
Oluwaseun Olorunsola
bd33cdbc24 Add new migration file for DisplayInManageSubscriptionPage column
MAILPOET-4669
2022-11-21 15:21:29 +01:00