Commit Graph

86 Commits

Author SHA1 Message Date
d39d09dd72 Remove calls to Subscriber::setError() from ConfirmationEmailMailer
This commit is part of a task to replace Paris with Doctrine in the
class ConfirmationEmailMailer. Specifically, it removes two calls to
Subscriber::setError() inside ConfirmationEmailMailer::sendConfirmationEmail().

setError() was used to define an error message that was used only in one
of the instances where sendConfirmationEmail() is called
(API::subscribeToLists()). setError() was replaced with code that throws
an exception when there is an error. Thus it was necessary to change all
the places where ConfirmationEmailMailer::sendConfirmationEmail() is
called to handle the exception.

In some cases, there are some oddities as sendConfirmationEmail() can
return false or throw an exception in case of an error and calling code
must account for both. I decided to settle with this approach as
refactoring the rest of this method to use exceptions instead of
returning false seemed outside of the scope of this task.

[MAILPOET-3815]
2021-12-13 16:03:07 +01:00
6c05b3eaf0 Pass SubscriberEntity to sendConfirmationEmail() and sendConfirmationEmailOnce()
This commit changes the methods sendConfirmationEmail() and
sendConfirmationEmailOnce() to accept as the first parameter an instance
of SubscriberEntity instead of the old model Subscriber. It also updates
all the places where those two methods are called.

[MAILPOET-3815]
2021-12-13 16:03:07 +01:00
7ecddae1f5 Improve error message
[MAILPOET-3865]
2021-11-08 10:15:35 +01:00
52b3e34839 Create controller for subscribe Subscribers
[MAILPOET-3032]
2021-04-12 14:26:36 +02:00
dcc70b3865 Use doctrine for save Subscriber
[MAILPOET-3031]
2021-03-29 15:22:53 +02:00
441cb86a76 Refactor subscription segments selection from old model to api
[MAILPOET-3297]
2021-01-04 11:32:28 +01:00
65ca040a20 Always inject welcome emails scheduler
[MAILPOET-3141]
2020-11-09 12:56:17 +01:00
db9b51e12a Add a bulk unsubscribe server side action
[MAILPOET-2978]
2020-10-29 09:32:59 +01:00
c24d28fbfd Deny deleting subscribers who are WP user
[MAILPOET-3138]
2020-10-20 17:22:06 +02:00
aa6d0ba878 Subscribers bulk actions refactored to Doctrine
[MAILPOET-3033]
2020-10-07 14:26:54 +02:00
d7e64b6fd0 Load dynamic segments for subscribers listing in listing repository
[MAILPOET-3077]
2020-09-28 14:26:53 +02:00
c952ef9542 Use only Listing repository in subscribers listing API
[MAILPOET-3077]
2020-09-28 14:26:53 +02:00
a42b3d6e3f Refactor mailpoet_subscribers_listings_filters_segments to direct calls
[MAILPOET-3077]
2020-09-28 14:26:53 +02:00
597f6acaca Leave filters out of refactoring
[MAILPOET-2657]
2020-08-06 12:23:41 +02:00
33e2c3d9d2 Add test for respository
[MAILPOET-2657]
2020-08-06 12:23:41 +02:00
ff23e4275a Build listings response
[MAILPOET-2657]
2020-08-06 12:23:41 +02:00
474be136f9 Create subscribers response builder
[MAILPOET-2653]
2020-07-01 12:36:33 +02:00
0a5f941ae6 Make sure source is updated only on status change
[MAILPOET-2737]
2020-06-24 10:28:52 +02:00
b569f0cc8e Track all changes by admin
[MAILPOET-2737]
2020-06-24 10:28:52 +02:00
c3e0f5cf76 Move optional parameter after mandatory
[MAILPOET-2737]
2020-06-24 10:28:52 +02:00
6e1cf96330 Display the unsubscribe reason to the user
[MAILPOET-2792]
2020-06-24 10:28:52 +02:00
4e3b206734 Track admin unsubscribe
[MAILPOET-2792]
2020-06-24 10:28:52 +02:00
d0acad5c3b Inject WPFunctions to FieldNameObfuscator using DI
[MAILPOET-2665]
2020-02-13 18:42:55 +00:00
wxa
d41eca48b2 Fix captcha case in comparison [MAILPOET-2698] 2020-02-12 18:11:06 +00:00
8c848cfa28 Convert property names to camel case
[MAILPOET-1796]
2020-01-14 15:22:42 +01:00
54549ff037 Convert variable names to camel case
[MAILPOET-1796]
2020-01-14 15:22:42 +01:00
43df66d162 Add public keyword to methods
[MAILPOET-2413]
2019-12-26 18:09:45 +03:00
ade1cc4d8e Autofix alphabetically sorted use statements
[MAILPOET-2409]
2019-10-01 14:29:30 +01:00
de3c519fbf Refactor subscribers API to use updated captcha session
[MAILPOET-2343]
2019-09-25 19:53:52 +01:00
0dd7b5fb7a Remove unnecessary aliases for SubcriptionUrlFactory
[MAILPOET-2381]
2019-09-25 10:29:20 +01:00
7dba4d900c Rename Subscription\Url to Subscription\SubscriptionUrlFactory
[MAILPOET-2381]
2019-09-25 10:29:20 +01:00
54632b20c2 Refactor getCaptchaUrl to instance method
[MAILPOET-2381]
2019-09-25 10:29:20 +01:00
644e0caeeb Fix user being unsubscribed from non default lists
[MAILPOET-2292]
2019-09-23 16:50:21 +01:00
01a0fe96c4 Remove no longer necessary checks
[MAILPOET-1948]
2019-09-12 13:59:32 +02:00
481cae676c Add subscribers API action for sending confirmation email
[MAILPOET-2316]
2019-09-09 11:35:38 +01:00
wxa
7ca234d92c Update an error message [MAILPOET-2323] 2019-09-04 12:13:06 -04:00
c90a2e41a1 Use separate scheduler for welcome emails
[MAILPOET-2321]
2019-08-29 13:55:49 -04:00
3de1eead47 i18n: use uppercase "CAPTCHA" to march to other translation strings 2019-08-28 08:01:31 -04:00
881d068f8b Use build-in captcha only when session is avaiable
[MAILPOET-2248]
2019-08-05 21:10:23 +01:00
8e1c3b8c03 Use CaptchaSession service instead of PHP Session
[MAILPOET-2248]
2019-08-05 21:10:23 +01:00
wxa
97f0b9104c Fix session form data being reset if throttling kicks in [MAILPOET-2015] 2019-07-23 08:37:46 -04:00
wxa
cfb108d240 Convert throttling timeout from seconds to a human-readable string [MAILPOET-2015] 2019-07-23 08:37:46 -04:00
wxa
4a309e7317 Fix more PR remarks [MAILPOET-2015]
Use fast termination to remove some nesting
Use DI for CaptchaRenderer
Remove unused vars in router subscription endpoint
2019-07-23 08:37:46 -04:00
wxa
8647244807 Move captcha validation to a separate method [MAILPOET-2015] 2019-07-23 08:37:46 -04:00
wxa
b174a55d07 Handle captcha during subscription [MAILPOET-2015] 2019-07-23 08:37:46 -04:00
5da7110eb6 Use short array syntax
[MAILPOET-2090]
2019-05-20 10:18:45 -04:00
ae70f7ae9b Display subscribers with correct status
[MAILPOET-1944]
2019-04-29 06:52:36 -04:00
3e66e9e1dd Fix phpstan level 6
[MAILPOET-1969]
2019-04-10 09:55:13 -04:00
6493f7ceb4 Validate only fields in form
[MAILPOET-1828]
2019-04-08 10:35:20 -04:00
acbf363412 Prevent scheduling welcome emails
If subscriber is imported we don't want to send them welcome emails if their data are updated

[MAILPOET-1908]
2019-04-01 07:02:54 -04:00