Commit Graph

54 Commits

Author SHA1 Message Date
1d69fcb49f Deprecate NewsletterSegment model as it is not used anymore
[MAILPOET-5763]
2024-02-23 17:07:34 +01:00
3312d033ef Deprecate Newsletter model as it is not used anymore
[MAILPOET-5763]
2024-02-23 17:07:34 +01:00
cb0b4acd33 Deprecate CustomField model as it is not used anymore
[MAILPOET-5763]
2024-02-23 17:07:34 +01:00
1d6a6a7894 Deprecate main Model class as models are not used anymore
[MAILPOET-5763]
2024-02-23 17:07:34 +01:00
d6da2af55b Extract newsletter bulk delete logic to a controller
Repositories shouldn't inject other repositories. Also, this solves circular DI dependency.

[MAILPOET-5845]
2024-02-02 12:48:40 +01:00
a1017c4380 Remove last use of the Tasks\Sending class
I was not able to figure out a easy replacement for this use. As far as
I could check, Newsletter::getQueue() is only called inside
Newsletter::withSendingQueue() and the later is not used anywhere. That
is why I opeted to simply remove the call to
SendingTask::getByNewsletterId().

This could break third-party code using Newsletter::getQueue(). At least they
will get a deprecation notice and won't get a fatal error.

[MAILPOET-5684]
2024-01-31 12:21:54 +01:00
53bf712da9 Deprecate the StatisticsNewsletters model
This method is not used anymore and can be deprecated.

[MAILPOET-5737]
2024-01-17 22:32:37 +05:00
2ec8a0aa7a Remove two deprecated methods from the Newsletter model
Those methods were deprecated over six months ago and can now be
removed. They are assoacited with the NewsletterOption model which was
removed in the previous commit.

deprecationError() is also removed as PHPStan was complaining that it is
not used anymore.

[MAILPOET-5762]
2023-12-01 14:18:48 -03:00
93f12691f7 Remove depreacted models NewsletterOption and NewsletterOptionField
[MAILPOET-5762]
2023-12-01 14:18:48 -03:00
57129bd460 Deprecate \MailPoet\Models\ScheduledTaskSubscriber::setSubscribers()
This model is no longer used since Sending::setSubscribers() was
refactored in a previous commit.

[MAILPOET-4368]
2023-10-25 10:31:45 +02:00
d17d9ce246 Remove one more deprecated method from the Segment model
This methods was deprecated a long time ago and it is not used anymore.

[MAILPOET-5455]
2023-07-05 12:09:22 +03:00
bb16e94a5b Remove deprecated methods from the Segment model
Those methods were long deprecated and are not used anymore.

[MAILPOET-5455]
2023-07-05 12:09:22 +03:00
00d021109c Move ModelValidator::validateNonRoleEmail() to a new Validator class
We want to remove/refactor the whole ModelValidator class as part of the
Doctrine refactor.

This commit moves the method ModelValidator::validateNonRoleEmail() to a
new Validator class as the method is not used by the validator system of
the Paris models. ModelValidator::validateEmail() was also moved as it
is called by ModelValidator::validateNonRoleEmail().

[MAILPOET-4343]
2023-05-17 12:37:22 +02:00
d760272678 Remove ModelValidator::validateIPAddress()
We want to remove/refactor the whole ModelValidator class as part of the
Doctrine refactor. As a first step, this commit removes the method
ModelValidator::validateIPAddress(). It was unused in a single place and
it was replaced with a direct call to the builtin PHP way to validate an
IP address.

[MAILPOET-4343]
2023-05-17 12:37:22 +02:00
87f703f22a Update NewsletterOption and NewsletterOptionField removal date
This commit updates the remove date of the deprecated models
NewsletterOption and NewsletterOptionField. When they were initially
deprecated it was missed that two Newsletter model methods still used
them.

Those two methods are deprecated in this commit as apparently they are
not used anymore in MP's codebase.

[MAILPOET-5252]
2023-04-28 17:23:03 +01:00
6f511c685b Remove deprecated methods from the Newslleter model
Those methods were deprecated over six months ago.

[MAILPOET-5252]
2023-04-28 17:23:03 +01:00
854e8a7f07 Remove models that were deprecated over six months ago
The removal date of all these models passed a couple of months ago.

[MAILPOET-5252]
2023-04-28 17:23:03 +01:00
ca3487abee Introduce Automation notification email type
[PREMIUM-223]
2023-04-27 13:40:10 +02:00
69f21814e3 Rename "transactional" email type to "automation_transactional"
[MAILPOET-5258]
2023-04-24 09:54:08 +03:00
18baff3888 Add type transactional
[MAILPOET-4999]
2023-04-17 13:59:39 +02:00
40f4216ff8 Add method for getting WC coupons
[MAILPOET-4761]
2023-01-30 09:36:21 +01:00
ee83e4d748 Refactor SubscriberActions:subscribe to return status of confirmation email
We need to pass the error or success info about the confirmation email
in order to be able to be able to display the error message.
[MAILPOET-4736]
2022-12-28 14:25:56 +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
5278ed324d Remove ScheduledTask::touchAllByIds method
[MAILPOET-4309]
2022-08-31 13:42:21 +02:00
4687fcd44f Remove refactored method from old model
[MAILPOET-4310]
2022-08-22 11:04:45 +02:00
8d29c2df49 Deprecate MappingToExternalEntities model and stop creating its table
Since we are removing all the MP2 migration code the table
wp_mailpoet_mapping_to_external_entities is not needed anymore. It was
used to map MP2 objects to MP3 objects. This commit removes the code
that creates this table for new installs and deprecates its model.

[MAILPOET-4376]
2022-08-15 12:46:22 +02:00
97e160bf67 Fix WordPress.WP.I18n.MissingArgDomain
[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
09160a58ff Replace deprecated NewsletterOptionField::findArray with doctrine code
This commit is a quick fix for deprecation warnings which we get after we deprecated NewsletterOptions
and NewsletterOptionFields models.
We will soon stop using the old Newsletter model completely.
[MAILPOET-4511]
2022-07-29 10:33:05 +02:00
f27326b590 Deprecate models NewsletterOption and NewsletterOptionField
Those models are being deprecated as they are not used anymore in our
codebase.

[MAILPOET-4150]
2022-07-27 08:48:44 +02:00
5985a10c8f Deprecate some unused Models\Newsletter methods
This commit deprecates the following Models\Newsletter methods:

- \MailPoet\Models\Newsletter::filterType()
- \MailPoet\Models\Newsletter::getWelcomeNotificationsForSegments()
- \MailPoet\Models\Newsletter::duplicate()

I'm doing this as part of a ticket to replace the models
NewsletterOption and NewsletterOptionField with Doctrine code. The
methods deprecated here use those models. But since they are not used
anymore in our codebase, I figured it would be easier to deprecate them
instead of replacing the models.

[MAILPOET-4150]
2022-07-27 08:48:44 +02:00
a2f65bf647 Migrate PersonalDataExporters\NewslettersExporter to Doctrine
[MAILPOET-4348]
2022-07-18 16:47:48 +02:00
f50ed0cd04 Add missing re_engagement type to newsletter meta info
[MAILPOET-4393]
2022-07-14 12:01:49 +02:00
868661a543 Add email type 'automation'
[MAILPOET-4432]
2022-07-04 14:04:16 +03:00
64c184de9e Revert "Deprecate models NewsletterOption and NewsletterOptionField"
This reverts commit 5fc426e18a.
2022-05-17 12:27:46 +02:00
74e59e5f96 Revert "Deprecate some unused Models\Newsletter methods"
This reverts commit 1c70f2ccff.
2022-05-17 12:27:46 +02:00
725b7b0bf5 Deprecate models NewsletterOption and NewsletterOptionField
Those models are being deprecated as they are not used anymore in our
codebase.

[MAILPOET-4150]
2022-05-16 13:18:21 +02:00
73aa081876 Deprecate some unused Models\Newsletter methods
This commit deprecates the following Models\Newsletter methods:

- \MailPoet\Models\Newsletter::filterType()
- \MailPoet\Models\Newsletter::getWelcomeNotificationsForSegments()
- \MailPoet\Models\Newsletter::duplicate()

I'm doing this as part of a ticket to replace the models
NewsletterOption and NewsletterOptionField with Doctrine code. The
methods deprecated here use those models. But since they are not used
anymore in our codebase, I figured it would be easier to deprecate them
instead of replacing the models.

[MAILPOET-4150]
2022-05-16 13:18:21 +02:00
01f0585400 Remove three Paris models that have been deprecated over six months ago
This commit removes the models Form, NewsletterLink and
StatisticsUnsubscribes as they were deprecated over six months ago and
are not used anymore in our codebase.

[MAILPOET-4325]
2022-05-16 11:33:00 +02:00
611cf5abb7 Deprecate StatisticsWooCommercePurchases model as it is not used anymore
We can remove this model after six months.

[MAILPOET-4150]
2022-05-13 08:45:28 +02:00
1c9a5afc2b Deprecate the old model StatisticsOpens
This model is not used anymore in our codebase and can be removed after
a six months grace period.

[MAILPOET-4150]
2022-05-13 08:45:28 +02:00
0f5700bf2b Replace old model StatisticsOpens with Doctrine code in StatisticsNewsletters
The test class \MailPoet\Subscribers\ImportExport\PersonalDataExporters\NewslettersExporterTest
calls the modified
\MailPoet\Models\StatisticsNewsletters::getAllForSubscriber() method
several times so it can be used to confirm that the changes made in this
commit work as expected.

[MAILPOET-4150]
2022-05-13 08:45:28 +02:00
d010cb1a69 Deprecate the model StatisticsClicks
This model is not used anymore in our codebase and can be removed after
a six months grace period.

[MAILPOET-4150]
2022-05-13 08:45:28 +02:00
6c98e5adcf Deprecate DynamicSegmentFilter model as it is not used anymore
We can remove this model after six months.

[MAILPOET-4150]
2022-05-13 08:45:28 +02:00
a8d88beec9 Escape output according to WP sniffs
[MAILPOET-4129]
2022-04-04 17:12:33 +02:00
1cb89dd41d Remove unused ScheduledTaskSubscriber model methods
[MAILPOET-4006]
2022-04-04 15:33:52 +02:00
ed1c9e5202 Move ScheduledTaskSubscrineb constants from old model to entity
[MAILPOET-4006]
2022-04-04 15:33:52 +02:00
9c1f0556b7 Replace old model ScheduledTaskSubscriber with ScheduledTaskSubscriberEntity in SubscribersFinder
[MAILPOET-3925]
2022-03-28 08:13:53 +02:00
82e05dfe0f Add fixes for better compatibility with PHP8.1
[MAILPOET-4015]
2022-03-14 09:38:20 +01:00