Commit Graph

378 Commits

Author SHA1 Message Date
Rodrigo Primo
1dbedea50f Refactor MetaInfo::getConfirmationMetaInfo() to use Doctrine
This method is used only inside
ConfirmationEmailMailer::sendConfirmationEmail(). So I figured it was
best to refactor it as well to use SubscriberEntity instead of the old
Subscriber model as part of the task to do the same for the
ConfirmationEmailMailer class. I opted for this approach since it was a
straightforward change.

[MAILPOET-3815]
2021-12-13 16:03:07 +01:00
Jan Lysý
c0c7e23b0e Remove the rest of the old model usage
[MAILPOET-3753]
2021-12-06 14:52:34 +01:00
Rodrigo Primo
5c6000bed6 Fix: duplicated entries when exporting subscribers of dynamic segments
This commit fixes a bug in the code that exports subscribers to a CSV
file. This bug caused duplicated entries when exporting subscribers of
dynamic segments. Instead of a given subscriber appearing only once in the
CSV file, they would be included multiple times, and the number of times
would depend on the number of static segments that they had subscribed to.

This bug was caused by a problem in the code that generates the SQL
query used to fetch the subscribers that will be exported. The same
method is used for subscribers not linked to a segment, static
segments, and dynamic segments. The table wp_mailpoet_segments was
included in the query in the three cases, but it should not be included
for dynamic segments as this type of segment does not have a
corresponding entry in this table. Including this table without
specifying a segment ID (as there is not one for dynamic segments),
meant that MySQL would return an extra entry for a given subscriber for
each static segment that they had subscribed to.

[MAILPOET-3900]
2021-11-22 14:33:58 +01:00
Brezo Cordero
3cf95c7feb Attempt to convert dates using d/m/Y
[MAILPOET-3747]
2021-11-16 11:06:52 +01:00
oluwaseun Olorunsola
95f7e427f9 Use __ without using the WPFunctions wrapper
MAILPOET-3852
2021-11-03 13:35:18 +01:00
oluwaseun Olorunsola
1cdbf31b50 Include list column for excel subscribers export
MAILPOET-3852
2021-11-03 13:35:18 +01:00
Rostislav Wolny
73a9bed483 Replace deprecated doctrine methods in lib directory
[MAILPOET-3889]
2021-10-28 15:44:18 +02:00
Jan Lysý
6f22a65692 Fix strict mode compatibility in MySQL
[MAILPOET-3774]
2021-09-29 13:54:29 +02:00
Jan Lysý
ddb025c0ec Use Doctrine in InactiveSubscribersController
[MAILPOET-3774]
2021-09-29 13:54:29 +02:00
Jan Lysý
616b8868fe Improve inactive subscribers task
[MAILPOET-3774]
2021-09-29 13:54:29 +02:00
Pavel Dohnal
21839fc30b Fix indentation of multiline function declarations
[MAILPOET-3732]
2021-09-17 12:17:36 +02:00
Pavel Dohnal
cdda3480ca Make all constructor signatures multiline
[MAILPOET-3732]
2021-09-16 14:19:40 +02:00
Pavel Dohnal
db04687f3c Refactor to Doctrine
[MAILPOET-3765]
2021-09-13 10:19:15 +02:00
Rostislav Wolny
eae0072f24 Use WordPress current_time for setting lats engagement
[MAILPOET-3762]
2021-09-07 10:07:08 +02:00
Rostislav Wolny
62ae0db39e Update subscribers last engagement when they create new order
[MAILPOET-3762]
2021-09-07 10:07:08 +02:00
Rostislav Wolny
b215ab13c8 Track last engagement only once per minute
[MAILPOET-3762]
2021-09-07 10:07:08 +02:00
Rostislav Wolny
9c3fc95a6d Add updating last engagement within clicks tracking
[MAILPOET-3762]
2021-09-07 10:07:08 +02:00
Jan Lysý
aec9ecbcde Change return value from getItem in TransientCache
[MAILPOET-3778]
2021-09-06 12:14:38 +02:00
Rostislav Wolny
14ff48c7fa Differentiate machine and humans opens on subscriber stats API
[MAILPOET-3741]
2021-08-31 15:15:54 +02:00
Rodrigo Primo
8b7815caf8 Use Doctrine for the opens and clicks exporters
This commit refactors the code that handles exporting e-mails opens and
clicks when generating the personal data file to use Doctrine instead of
Paris. I opted to do this in this task as opens and clicks code share
some functionality, and I didn't want to add more code that relies on
Paris, as we are eventually going to remove it.

[MAILPOET-3738]
2021-08-25 17:01:33 +02:00
Rodrigo Primo
780ac5e53c Add email opens data when exporting personal data
This commit adds stats about email opens data to the personal data
exported by WP.

To do this, I refactored the code that adds email clicks stats to use
base abstract class with functionality that is shared between both
exporters.

[MAILPOET-3738]
2021-08-25 17:01:33 +02:00
Rodrigo Primo
4fdcee1064 Add the new user agent field when exporting data about clicks
This commit includes information about the user agent used when clicking
links in e-mails to the data that MailPoet exports when the WP tool
"Export Personal Data" is used.

When information about the user agent is not available, the string
'Unknown' is displayed instead.

This information is available under the section "MailPoet Emails
Clicks".

[MAILPOET-3738]
2021-08-25 17:01:33 +02:00
Ján Mikláš
0daaac8abf Ignore Html2Text::convert errors in confirmation email
[MAILPOET-3756]
2021-08-23 11:33:57 +02:00
Brezo Cordero
44932d27c9 Allow import subscribers with empty IP address
Allow import subscribers with empty confirmed_ip or subscribed_ip when one of the columns is selected in the last step of the import.
Don't allow importing invalid IP addresses - still import the subscriber but remove the invalid IP address.

[MAILPOET-3665]
2021-08-16 10:37:31 +02:00
Jan Lysý
5e1f523c96 Improve code according the review
[MAILPOET-3708]
2021-08-16 10:25:37 +02:00
Jan Lysý
74dc9fce53 Remove the character "~" from counts
[MAILPOET-3708]
2021-08-16 10:25:37 +02:00
Rodrigo Primo
e59992cc16 Fix checkGenericClassInNonGenericObjectType PHPStan errors
This commit removes the checkGenericClassInNonGenericObjectType flag
from PHPStan configuration files and fixes all associated errors in our
code base.

[MAILPOET-3236]
2021-08-09 12:58:56 +02:00
Jan Lysý
19fad073d0 Add cleanup subscribers counts cache
[MAILPOET-3714]
2021-08-09 10:38:37 +02:00
Jan Lysý
a6dc552cdc Use new controller with subscribers counts
[MAILPOET-3646]
2021-07-12 11:51:39 +02:00
Jan Lysý
ac2a70f39b Create controller for counting subscribers
[MAILPOET-3646]
2021-07-12 11:51:39 +02:00
Jan Lysý
40a511c641 Use transient cache for count of subscribers in lists
[MAILPOET-3646]
2021-07-12 11:51:39 +02:00
Jan Lysý
96c84009b7 Add tilde before subscribers count in selects
[MAILPOET-3646]
2021-07-12 11:51:39 +02:00
Rostislav Wolny
7a3ffa388f Update PHPStan
[MAILPOET-3658]
2021-07-06 13:29:00 +02:00
Rostislav Wolny
65b834a9ff Update renamed NotCamelCaps rule
[MAILPOET-3658]
2021-07-06 13:29:00 +02:00
Jan Lysý
608396ade9 Remove segment ids from unconfirmed data on subscribe
[MAILPOET-3663]
2021-06-28 13:40:36 +02:00
Jan Lysý
6773c42131 Add check that signup confirmation is disabled
[MAILPOET-3659]
2021-06-28 12:26:03 +02:00
Jan Lysý
7d49d39efc Use Doctrine entities in SubscriptionUrlFactory
[MAILPOET-3269]
2021-06-14 10:12:34 +02:00
Jan Lysý
aeeceeeb8d Use Newsletter\Url as service
[MAILPOET-3269]
2021-06-14 10:12:34 +02:00
Jan Lysý
d34c923cef Use Doctrine model in LinkTokens service
[MAILPOET-3269]
2021-06-14 10:12:34 +02:00
Jan Lysý
cfa29c9df1 Change cron scheduling for SubscribersEngagementScore
[MAILPOET-3585]
2021-05-03 11:23:47 +02:00
Rostislav Wolny
694dde085f Optimise tasks SQL query in inactive subscribers detection
[MAILPOET-3582]
2021-04-28 10:52:39 +02:00
Pavel Dohnal
a2c1b4f8bc Display subscribers score on the listings page
[MAILPOET-3525]
2021-04-26 13:46:23 +02:00
Jan Lysý
dbbe0266ec Calculate batch size for import custom fields
[MAILPOET-3570]
2021-04-19 12:44:43 +02:00
Jan Lysý
fc455d7cfa Add saving custom fields on subscribe
[MAILPOET-3032]
2021-04-12 14:26:36 +02:00
Jan Lysý
02e1ce7e4d Remove getFields method from FormEntity
[MAILPOET-3032]
2021-04-12 14:26:36 +02:00
Jan Lysý
4d56020071 Remove usage old model from Throttling
[MAILPOET-3032]
2021-04-12 14:26:36 +02:00
Jan Lysý
4631fb7320 Add SubscriberIP entity and repository
[MAILPOET-3032]
2021-04-12 14:26:36 +02:00
Jan Lysý
a715aa9b76 Replace usages of StatisticsForms with Doctrine
[MAILPOET-3032]
2021-04-12 14:26:36 +02:00
Jan Lysý
52b3e34839 Create controller for subscribe Subscribers
[MAILPOET-3032]
2021-04-12 14:26:36 +02:00
Jan Lysý
7db23849f7 Use Doctrine in SubscriberActions
[MAILPOET-3032]
2021-04-12 14:26:36 +02:00