Commit Graph

114 Commits

Author SHA1 Message Date
Oluwaseun Olorunsola
0595852d5a Update subscription confirmation email subject
Allow shortcode processing in subject

MAILPOET-4599
2022-11-01 14:59:28 +01:00
Oluwaseun Olorunsola
80f22c5b50 Process confirmation email content with newsletter shortcode engine
MAILPOET-4599
2022-11-01 14:59:28 +01:00
Jan Lysý
0bbf1b96d5 Add notifications about imported subscribers
[MAILPOET-4727]
2022-10-27 09:31:40 +02:00
Jan Lysý
28b91ed994 Notify about subscriber changes in repository
[MAILPOET-4727]
2022-10-27 09:31:40 +02:00
Jan Lysý
8d5c07a317 Add notifying about deleted subscribers
[MAILPOET-4727]
2022-10-27 09:31:40 +02:00
Jan Lysý
668aabb00d Add updatedAt to selection
[MAILPOET-4716]
2022-10-13 11:12:10 +02:00
Jan Lysý
f6928c982f Add filtering by updatedAt
[MAILPOET-4716]
2022-10-13 11:12:10 +02:00
Jan Lysý
88f427290b Add tagging subscribers subscribed via form
[MAILPOET-4557]
2022-09-28 11:42:51 +02:00
Jan Lysý
71635f9520 Add removing tags when subscriber is deleted
[MAILPOET-4558]
2022-09-15 11:26:10 +02:00
Jan Lysý
daa5575d87 Reduce maximum records count in batch to exact size
[MAILPOET-4558]
2022-09-15 11:26:10 +02:00
Jan Lysý
5c57dd2006 Add saving tags for imported subscribers
[MAILPOET-4558]
2022-09-15 11:26:10 +02:00
Jan Lysý
a523bb493f Add a token field with tags to the import form
[MAILPOET-4558]
2022-09-15 11:26:10 +02:00
Pavel Dohnal
086852ee4d Remove version number from the source
[MAILPOET-4474]
2022-09-09 11:25:51 +02:00
Jan Lysý
3d4f7cc33f Fix subscribers' segment filter
[MAILPOET-4563]
2022-08-31 15:52:00 +02:00
Jan Jakes
24cca1ba04 Cache total subscribers count, add tests
[MAILPOET-4416]
2022-08-24 12:18:44 +02:00
Rodrigo Primo
efab3be9ae Remove logic to handle MP2 subscribers when deactivating subscribers
This commit removes the logic that was added in #2045 to handle
subscribers migrated from MP2 when deactivating subscribers. Without it,
MP3 would deactive all subscribers imported from MP2 as the subscribe
date is migrated but the stats are not (see
https://mailpoet.atlassian.net/browse/MAILPOET-2040) for more details.

This code is not necessary anymore as we are removing all the MP2 migration
related code.

[MAILPOET-4376]
2022-08-15 12:46:22 +02:00
Rostislav Wolny
7fde0b6bdc Remove unnecessary usage of WPFunctions from SubscribersListingRepository
We agreed that we can use WP translation functions directly.
This one was probably some leftover which remained in the file after merging branches.
The file was missing use statement so this was causing an error.
[MAILPOET-4551]
2022-08-09 14:39:31 +02:00
David Remer
76048224d1 Fix WordPress.WP.I18n.NonSingularStringLiteralText errors
[MAILPOET-4524]
2022-08-09 13:23:16 +02:00
David Remer
218de96024 Fix WordPress.WP.I18n.MissingTranslatorsComment errors
[MAILPOET-4524]
2022-08-09 13:23:16 +02:00
David Remer
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
Jan Lysý
2b5d089a79 Add tag filter into subscribers response
[MAILPOET-4442]
2022-08-08 10:57:42 +02:00
Rodrigo Primo
af396021db Move the query to calculate the max subscriber ID to SubscribersRepository
[MAILPOET-4344]
2022-08-04 11:10:50 +02:00
Sam Najian
5b0e7128c6 Remove usages of StatisticsNewsletters in newsletter exporter
[MAILPOET-4348]
2022-08-01 14:18:59 +02:00
Sam Najian
31aa18868b Remove traces of older models in PersonalDataExports namespace
[MAILPOET-4348]
2022-08-01 14:18:59 +02:00
Sam Najian
10d4eb5d7f Remove old models from SegmentsExporter
[MAILPOET-4348]
2022-08-01 14:18:59 +02:00
Rodrigo Primo
7f055aef06 Replace Paris models with Doctrine in SubscriberPersonalDataEraser
[MAILPOET-4349]
2022-07-20 15:05:19 +02:00
Sam Najian
a2f65bf647 Migrate PersonalDataExporters\NewslettersExporter to Doctrine
[MAILPOET-4348]
2022-07-18 16:47:48 +02:00
Jan Lysý
856561c443 Remove old model usage from NewSubscriberNotificationMailer
[MAILPOET-4352]
2022-07-13 15:36:14 +02:00
Jan Lysý
6a0108edd0 Remove subscriberTag when tag doesn't exist
[MAILPOET-4440]
2022-07-12 13:35:00 +02:00
Jan Lysý
6baf4b21c3 Save or update subscriber's tags
[MAILPOET-4440]
2022-07-12 13:35:00 +02:00
Jan Lysý
79b27e005d Add SubscriberTagRepository
[MAILPOET-4440]
2022-07-12 13:35:00 +02:00
Jan Lysý
4440ebc3e6 Replace old model with Doctrine
[MAILPOET-4141]
2022-06-20 12:00:47 +02:00
John Oleksowicz
cf78783ef3 Include empty segments in subscribers filters
Although it doesn't make senses to select a segment with 0 subscribers
directly from the dropdown, we allow users to click a "view subscribers"
link or, with MAILPOET-4244, click a badge to see all the subscribers of
 that segment. The UI on the subscribers page indicates which segment is
  selected by selecting it in the dropdown.

 If we exclude lists with 0 subscribers (or 0 calculated
 subscribers), the filter selection is blank and the user has no way of
 knowing what filter is being applied. By including these empty lists
 we're giving users a way of knowing why there are 0 subscribers being
 shown.

MAILPOET-4244
2022-06-13 12:37:42 +02:00
Brezo Cordero
3d1365595b Remove catch block and change quotes
Remove catch block to log unexpected exceptions and change quotes for consistency on error message.

[MAILPOET-4259]
2022-06-06 11:59:27 +02:00
Brezo Cordero
2e5e8e808f Verify that new email is unique when editing a subscriber
Throws an exception with information message if email already exists.

[MAILPOET-4259]
2022-06-06 11:59:27 +02:00
Brezo Cordero
7c6f0b7777 Specify type of $fieldName to string on addField
[MAILPOET-3720]
2022-05-25 09:43:47 +02:00
Brezo Cordero
94fe87008a Remove PHPStan level 6 errors from Import
Remove the following errors from Subscribers\ImportExport\Import\MailChimp:
(Method|Property|Function) has no (return )?type specified.
(Method|Function) has parameter with no type (specified).

[MAILPOET-3720]
2022-05-25 09:43:47 +02:00
Brezo Cordero
34ce6cd329 Remove PHPStan level 6 errors from Import
Remove the following errors from Subscribers\ImportExport\Import\Import:
(Method|Property|Function) has no (return )?type specified.
(Method|Function) has parameter with no type (specified).

I have also added a few checks when using count and typed the arrays when possible.

[MAILPOET-3720]
2022-05-25 09:43:47 +02:00
Brezo Cordero
f6dfb19362 Remove PHPStan level 6 errors from Segments\WP
Remove the following errors:
(Method|Property|Function) has no (return )?type specified.
(Method|Function) has parameter with no type (specified).
array_walk on import.php was expecting the key as the second parameter to the function. I have switched it to array_map.

[MAILPOET-3720]
2022-05-23 12:04:12 +02:00
Rodrigo Primo
5c9926b140 Refactor ImportExportFactory to use Doctrine instead of Paris
[MAILPOET-4139]
2022-05-23 11:37:26 +02:00
Rodrigo Primo
ba47f0b854 Rename variables to make the ReCaptcha code easier to understand
This commit renames two variables to make it easier to understand the
code responsible for adding a ReCapcha to a subscription form:

formData.recaptcha -> formData.recaptchaWidgetId
formData.data.recaptcha -> formData.data.recaptchaResponseToken

Before this change it was harder to understand the difference between
formData.recaptcha and formData.data.recaptcha since they used the same
name.

[MAILPOET-4145]
2022-05-19 09:22:30 +02:00
Rodrigo Primo
c1bd52b964 Add code to display the invisible ReCaptcha in the frontend
This commit adds the required code to display the invisible ReCaptcha in
the frontend when a form is rendered and this type of captcha is
selected in the admin.

[MAILPOET-4145]
2022-05-19 09:22:30 +02:00
Brezo Cordero
6e0b639fd3 Use intval instead of (int) to remove PHPStan errors
[MAILPOET-4281]
2022-05-09 13:05:21 +02:00
Brezo Cordero
bb3d1c2a7c Fix type error in meta in SubscribersEmailCount task
[MAILPOET-4281]
2022-05-09 13:05:21 +02:00
Rostislav Wolny
68cb5c4f79 Inject MailerFactory instead of mailer
We can't create mailer directly in DI container using the factory because it may fail in case
the plugin is not configured properly and prevent plugin from start.

The Mailer was previously injected because it contains lazy initialization.
The lazy initialization in the singleton Mailer service was dangerous,
because when used with some custom parameters it could cause that all services
that inject the Mailer from DI would use the custom config instead the default.
[MAILPOET-4115]
2022-04-11 16:54:38 +02:00
Brezo Cordero
36baf4c4e3 Simplify the query to calculate lifetime emails
Get max and count of subscribers in the query.

[MAILPOET-4177]
2022-04-07 10:17:38 +02:00
Brezo Cordero
7ab8055b69 Do not update email_count if there are no new emails
[MAILPOET-4177]
2022-04-07 10:17:38 +02:00
Brezo Cordero
8077322a29 Simplify the query to calculate lifetime emails
Also rename email_counts to email_count and update tests

[MAILPOET-4177]
2022-04-07 10:17:38 +02:00
Brezo Cordero
9e8aaec6c9 Add lifetime email counts to inactive subscribers criteria
[MAILPOET-4177]
2022-04-07 10:17:38 +02:00
Brezo Cordero
8b7b234446 Create controller to count emails per subscriber
This controller is built to be called by a cron SimpleWorker.

[MAILPOET-4177]
2022-04-07 10:17:38 +02:00