15608 Commits

Author SHA1 Message Date
David Remer
7f428c0c7a Change variable name from type to key
[MAILPOET-4418]
2022-08-02 14:39:33 +02:00
David Remer
ec58c24228 Allow for JSX.Element in subtitle
[MAILPOET-4418]
2022-08-02 14:39:33 +02:00
David Remer
e8d3edcc23 Remove unused icons
[MAILPOET-4418]
2022-08-02 14:39:33 +02:00
David Remer
03bf653432 Enable a colored icon
This commit introduces a <ColoredIcon /> component with which you can define the
color and background of the circle behind the colored icon.

The SVG's have been adjusted and the StepType has now a color attribute, with
which the color can be defined.

[MAILPOET-4418]
2022-08-02 14:39:33 +02:00
David Remer
83c7f7bc7f Update configuration arguments and invalidate 2 years of waiting
[MAILPOET-4418]
2022-08-02 14:39:33 +02:00
David Remer
a9a35333c4 Add delay step settings
[MAILPOET-4418]
2022-08-02 14:39:33 +02:00
David Remer
a7bda3f465 Make step subtitle dynamic
This commit enables us to render the subtitle of a step
dynamically depending on a given step configuration. This enables us to render
a subtitle like 'Wait for 4 days'.

[MAILPOET-4418]
2022-08-02 14:39:33 +02:00
David Remer
e0f6751538 Introduce getStepType selector
[MAILPOET-4418]
2022-08-02 14:39:33 +02:00
Sam Najian
db112dc03f Release 3.93.1 2022-08-02 14:35:08 +02:00
Jan Lysý
e706110230 Fix new subscriber notifications
[MAILPOET-4518]
2022-08-02 12:57:05 +02:00
Sam Najian
b2718940df Remove models from SegmentsExporterTest
[MAILPOET-4348]
2022-08-01 14:18:59 +02:00
Sam Najian
3ef32787cc Remove models from NewslettersExporterTest
[MAILPOET-4348]
2022-08-01 14:18:59 +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
Sam Najian
6b12255bb8 Move PersonalDataExporters to DI
[MAILPOET-4348]
2022-08-01 14:18:59 +02:00
Jan Lysý
84a6401590 Remove email signup step from Welcome Wizard
[MAILPOET-4497]
2022-08-01 13:44:44 +02:00
Jan Lysý
381565fc1f Improve integration ManageTest class
[MAILPOET-4350]
2022-08-01 13:28:57 +02:00
Jan Lysý
deaf293273 Remove redundant code removing relation
Removing inconsistent relations is solved in the class SubscriberEntity by the preFlush
[MAILPOET-4350]
2022-08-01 13:28:57 +02:00
Jan Lysý
fb05cc4297 Remove old model from Manage
[MAILPOET-4350]
2022-08-01 13:28:57 +02:00
Jan Lysý
155445b313 Remove old model from SendingQueue Migration
[MAILPOET-4358]
2022-08-01 13:09:20 +02:00
Jan Lysý
ce319e69c6 Remove old model from MigrationTest
[MAILPOET-4358]
2022-08-01 13:09:20 +02:00
Rodrigo Primo
c30fe1305b Replace Paris models with Doctrine entities in Shortcodes
It was necessary to deprecate the filter
mailpoet_archive_email_subject and create a new one since the type
of one of the parameters passed to the filter had to change.

[MAILPOET-4307]
2022-08-01 09:57:10 +02:00
Rodrigo Primo
351c4ca565 Replace Paris models with Doctrine entities in ShortcodesTest
[MAILPOET-4307]
2022-08-01 09:57:10 +02:00
Rodrigo Primo
6896758f13 Add a link to the MailPoet settings page in the page that lists plugins
[MAILPOET-4412]
2022-07-29 14:52:50 +02:00
Jan Lysý
c4cd053b34 Add inline class to MailPoet notices
The `inline` class is used to prevent moving notice by WP JavaScript (wp-admin/js/common.js) because it can break DOM, and events don't work anymore
[MAILPOET-4510]
2022-07-29 14:26:50 +02:00
Rostislav Wolny
8d4799b050 Fix models check conditions in sending queue
[MAILPOET-4511]
2022-07-29 10:33:05 +02:00
Rostislav Wolny
da4d72be50 Disable buttons on newsletter send page when newsletter is loading
The buttons were clickable even when newsletter data were not loaded.
This was causing acceptance test and potentially also production errors.
[MAILPOET-4511]
2022-07-29 10:33:05 +02:00
Rostislav Wolny
5042cdd15e Refactor fetching newsletter options in SendingQueue using doctrine
[MAILPOET-4511]
2022-07-29 10:33:05 +02:00
Rostislav Wolny
3b5d737143 Use WP ClI for setting wp-config.php constants
We experienced issues with replacing constants in wp-config.php using regular expressions.
E.g. it may stop working when new WP release changes default contents of the wp-config.php
Using WP CLI seems to be more reliable way of doing it.
[MAILPOET-4511]
2022-07-29 10:33:05 +02:00
Rostislav Wolny
1e1ef12d42 Remove no longer necessary WP CLI fix from acceptance tests
This seems to be already fixed in https://core.trac.wordpress.org/ticket/25239
[MAILPOET-4511]
2022-07-29 10:33:05 +02:00
Rostislav Wolny
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
Rostislav Wolny
3d4155f6cc Fix setting wp-config.php for acceptance tests
The wp-config properties were not set correctly because there reg exp
that was used in sed was no longer matching the default value.
This was causing e.g. that errors and warnings were not caught by the acceptnace tests.
[MAILPOET-4511]
2022-07-29 10:33:05 +02:00
Daniel Bachhuber
e53505354a Switch to SVG menu icon for Calypso compatibility
[MAILPOET-4472]
2022-07-27 09:43:42 +02:00
alex-mailpoet
1396a979f5 Fix PHPMailer on WP 5.6 in acceptance tests
[MAILPOET-4481]

Use SMTP in PHPMailer on WP 5.6 because its Docker container
has a misconfigured mail() function (no sendmail or alternative)
2022-07-27 08:50:03 +02:00
Rodrigo Primo
6525f3a55c Remove integration tests for deprecated models
This commit removes the integration tests for the models
NewsletterOptionField and NewsletterOption as they have been deprecated.

[MAILPOET-4150]
2022-07-27 08:48:44 +02:00
Rodrigo Primo
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
Rodrigo Primo
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
Rodrigo Primo
3684530056 Replace NewsletterOption and NewsletterOptionField models
This commit repleaces the old NewsletterOption and NewsletterOptionField
models with Doctrine code in several test classes.

[MAILPOET-4150]
2022-07-27 08:48:44 +02:00
Rodrigo Primo
81051e8295 Replace all Paris models with Doctrine code in SchedulerTest
[MAILPOET-4150]
2022-07-27 08:48:44 +02:00
Rodrigo Primo
22010874b7 Add method to the Newsletter datafactory to set the type to automatic
[MAILPOET-4150]
2022-07-27 08:48:44 +02:00
Rodrigo Primo
7d2fa9ff16 Use Doctrine entities and truncate only what is used in SubscriberTest
This commit replaces old Paris code with Doctrine entities in
SubscriberTest::_after() and it also truncate only the entities that are
actually used inside the test class. Before this change, the class was
unnecessarily truncating entities that were not used. I'm doing this
commit as part of task to remove all usages of the old NewsletterOption
model and that is why I'm not touching the remaining models in other
methods of this class.

[MAILPOET-4150]
2022-07-27 08:48:44 +02:00
Rodrigo Primo
ae13fcc771 Make sure $metas[] is always set for all subscribers in the foreach loop
See https://github.com/mailpoet/mailpoet/pull/4247#pullrequestreview-1050167548

[MAILPOET-4379]
2022-07-27 08:48:15 +02:00
Rodrigo Primo
932512b720 Replace Paris models with Doctrine entities in MetaInfoTest
In the process it was necessary to change the signature of the method
\MailPoet\Mailer\MetaInfo::getNewsletterMetaInfo() to accept a
SubscriberEntity instead of a Subscriber model and also change
\MailPoet\Cron\Workers\SendingQueue\SendingQueue::processQueue() as it
calls getNewsletterMetaInfo().

Doing this was straightforward, but changing the test class for
SendingQueue was a bit more involved. In particular, the test
SendingQueueTest::testItEnforcesExecutionLimitsAfterQueueProcessing().

This test is a bit brittle and was creating Subscriber models without
saving them to the database with invalid statuses and sources. Switching
getNewsletterMetaInfo() to use entities, while
SendingQueue::processQueue() still uses models, meant that it was
necessary to save the subscribers to the database. Because of this, it
was not possible anymore to use invalid statuses and sources, and
thus, the test changed a bit.

[MAILPOET-4379]
2022-07-27 08:48:15 +02:00
Rodrigo Primo
f6fbcee0d0 Remove integration test for when subscriber source is null
This test is being removed as the field source of the table
wp_mailpoet_subscribers does not accept a null value. When changing the
test class MetaInfoTest from Paris to Doctrine, there is no easy way to
set subscriber source to null and since it is not possible to store this
value in the database anyway, it seems to me this test is not necessary.

I'm opting to keep the code in MetaInfo that sets `subscriber_source` to
`unknown` if the subscriber source is null
(9f790efbf0/mailpoet/lib/Mailer/MetaInfo.php (L64))
just in case this is still possible in some old databases (which I don't
think is the case).

[MAILPOET-4379]
2022-07-27 08:48:15 +02:00
Rodrigo Primo
15de269da0 Replace Paris models with Doctrine entities in LinksTest
[MAILPOET-4379]
2022-07-27 08:48:15 +02:00
Rodrigo Primo
2f6dc17228 Replace Paris models with Doctrine entities ShortcodesTest
[MAILPOET-4379]
2022-07-27 08:48:15 +02:00
Rodrigo Primo
831fb46c48 Replace Newsletter model with NewsletterEntity in MetaInfoTest
[MAILPOET-4379]
2022-07-27 08:48:15 +02:00
Rodrigo Primo
026aa684a5 Replace Paris models with Doctrine entities in WorkerTest
[MAILPOET-4379]
2022-07-27 08:48:15 +02:00
Rodrigo Primo
5f0f28a5c2 Remove unused import
[MAILPOET-4379]
2022-07-27 08:48:15 +02:00