Commit Graph

34 Commits

Author SHA1 Message Date
aa5b052e66 Handle sanitization as early as possible per best practices
Per WP security best practices, sanitization should be handled as early
as possible. So this commit move updates the calls to sanitize the
segment name and description to the part of the code where the user
input is first processed, instead of when the data is saved to the
database.

[MAILPOET-5232]
2023-04-17 14:33:51 -03:00
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
0bbd65ac61 Sanitize segment data when persisty via public API
[MAILPOET-4942]
2023-01-16 13:59:30 +01:00
926620e8f8 Ignore strict types rule in all existing files that don't have it
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
725e0ecb00 Remove automation feature flag
[MAILPOET-4788]
2022-11-14 12:35:29 +02:00
8161b83ded Add check on list type when deleting list
[MAILPOET-4752]
2022-11-02 14:05:39 +01:00
ad46d05c6b Add check on list type
[MAILPOET-4752]
2022-11-02 14:05:39 +01:00
f231f3dc6d Fix type error for list update
[MAILPOET-4752]
2022-11-02 14:05:39 +01:00
56c79dd66a Add API method deleteList
[MAILPOET-4752]
2022-11-02 14:05:39 +01:00
25ba667cb1 Move segment id validation to private method
[MAILPOET-4752]
2022-11-02 14:05:39 +01:00
fbf4c853c1 Add new API method updateList
[MAILPOET-4752]
2022-11-02 14:05:39 +01:00
5fba25d823 Fix the exception message
[MAILPOET-4752]
2022-11-02 14:05:39 +01:00
18efc02921 Move list validation to a private method
We move the segment's name validation to a private method to avoid code repetition.
[MAILPOET-4752]
2022-11-02 14:05:39 +01:00
8b1eabb765 Remove duplicated annotation for filter
[MAILPOET-4717]
2022-10-17 09:12:10 +02:00
375a6f8a4d Add new method getSubscribersCount
[MAILPOET-4717]
2022-10-17 09:12:10 +02:00
35fb4979a3 Move building listing definition to private method
[MAILPOET-4717]
2022-10-17 09:12:10 +02:00
296a47f8e7 Add new API method getSubscribers
[MAILPOET-4716]
2022-10-13 11:12:10 +02:00
1dac2522c6 Refactor public API getSubscriber to doctrine
[MAILPOET-4295]
2022-09-21 16:02:23 +02:00
2356c62be3 Refactor MP API addSubscriber to doctrine
[MAILPOET-4293]
2022-08-18 12:08:30 +02:00
1bf751978c Make a parameter in private method in MP API non-optional
[MAILPOET-4291]
2022-08-17 13:20:39 +02:00
5d3c851d02 Change order of MP API subscribe/unsubscribe calls checks to be backward compatible
In the previous version we checked the lists parameter before the subscriber.
[MAILPOET-4291]
2022-08-17 13:20:39 +02:00
c3251f4092 Refactor MP API unsubscribe from lists to doctrine
[MAILPOET-4291]
2022-08-17 13:20:39 +02:00
fbaf37ed0c Refactor getting subscriber and segments into a private methods
[MAILPOET-4291]
2022-08-17 13:20:39 +02:00
98e056bec7 Remove code that checks if the MP2 migration is in progress
[MAILPOET-4376]
2022-08-15 12:46:22 +02:00
76048224d1 Fix WordPress.WP.I18n.NonSingularStringLiteralText errors
[MAILPOET-4524]
2022-08-09 13:23:16 +02:00
218de96024 Fix WordPress.WP.I18n.MissingTranslatorsComment errors
[MAILPOET-4524]
2022-08-09 13:23:16 +02:00
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
c8278dde2a Use correct exception type when saving segment to DB fails
[MAILPOET-4294]
2022-08-04 13:31:53 +02:00
9c5dca0206 Refactor MailPoet\API\MP\v1\API::addList to doctrine
[MAILPOET-4294]
2022-08-04 13:31:53 +02:00
1a9845c916 Move getting segments to the new class
[MAILPOET-4292]
2022-07-14 11:29:09 +02:00
856561c443 Remove old model usage from NewSubscriberNotificationMailer
[MAILPOET-4352]
2022-07-13 15:36:14 +02:00
134bd7c6de Add a comment 2022-07-05 10:11:20 +02:00
86d934ba36 Add hook for segment subscription
This will be used for a "SegmentSubscribed" trigger for automation
that can trigger welcome emails and other actions.

[MAILPOET-4136]
2022-03-14 09:36:21 +01:00
9f790efbf0 Move plugin files to a subfolder
[MAILPOET-3988]
2022-01-18 15:30:22 +01:00