Commit Graph

332 Commits

Author SHA1 Message Date
David Remer
42d9b1241e Make menu strings translateable and use esc_html__() for menu titles
[MAILPOET-4728]
2022-10-25 12:04:44 -05:00
David Remer
fc4a5315df Add beta badge
[MAILPOET-4728]
2022-10-25 12:04:44 -05:00
Rostislav Wolny
b96b549f43 Unschedule cron actions before running migrations
We don't want to run any actions during migrations.
This will also clean duplicate trigger actions
that were potentially created because of requests race conditions.
[MAILPOET-4684]
2022-10-13 14:21:43 +02:00
David Remer
357dede83d Allow newsletter_id to be NULL in sending_queue table
[MAILPOET-4699]
2022-10-06 12:06:13 +02:00
Jan Jakes
1640ca37dc Add migration for notification history records that are stuck in sending status
[MAILPOET-4685]
2022-09-29 15:19:09 -03:00
Rodrigo Primo
8faa33643c Remove old Segment model from Config\Populator
[MAILPOET-4306]
2022-09-26 14:18:01 +02:00
Rodrigo Primo
ef66a21096 Remove old ScheduledTask model from Config\Populator
[MAILPOET-4306]
2022-09-26 14:18:01 +02:00
Rodrigo Primo
bc1ee3caa2 Remove old Subscriber model from Config\Populator
[MAILPOET-4306]
2022-09-26 14:18:01 +02:00
Rodrigo Primo
b15a6723cf Remove old SendingQueue model from Config\Populator
[MAILPOET-4306]
2022-09-26 14:18:01 +02:00
Rodrigo Primo
8d4a1140a9 Remove old Newsletter model from Config\Populator
[MAILPOET-4306]
2022-09-26 14:18:01 +02:00
David Remer
9f24579155 Add template listing page
[MAILPOET-4533]
2022-09-15 08:08:07 +02:00
Jan Jakes
ba35ddf6e6 Extract automation API to MailPoet REST API
[MAILPOET-4523]
2022-09-12 14:40:36 -05:00
Jan Jakes
598ae291e5 Fix issues detected by CodeSniffer
[MAILPOET-4617]
2022-09-06 17:38:01 +02:00
Jan Jakes
c601aaa3eb Autofix issues detected by CodeSniffer
[MAILPOET-4617]
2022-09-06 17:38:01 +02:00
Jan Jakes
7ce53adc33 Use static premium download URL instead of fetching it from bridge
This was causing HTTP requests to bridge on each page load for some of MP admin pages.

[MAILPOET-4416]
2022-08-24 12:18:44 +02:00
Rodrigo Primo
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
Rodrigo Primo
d874375c25 Remove MP2 migration main class and its test class
This commit removes the main MP2 migration class and its test class. It
also removes two SQL files that were used in the test class. One of
those files executed the following query:

`SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"`

Removing this query made the tests inside SubscriberSegmentTest fail
when running the whole integration test suite. To work around this, I
added the above mentioned query to SubscriberSegmentTest. I'm not sure
why this test class fails without this query when running all the tests
but it doesn't when it is executed alone. Probably there is another test
class changing the SQL_MODE. Since SubscriberSegmentTest is a test class
for a Paris model that we will eventually remove, I decided it was not
necessary to investigate this further.

[MAILPOET-4376]
2022-08-15 12:46:22 +02:00
Rodrigo Primo
98e056bec7 Remove code that checks if the MP2 migration is in progress
[MAILPOET-4376]
2022-08-15 12:46:22 +02:00
Rodrigo Primo
d828754f94 Remove MP2 migration admin page
[MAILPOET-4376]
2022-08-15 12:46:22 +02:00
David Remer
97e160bf67 Fix WordPress.WP.I18n.MissingArgDomain
[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 Jakes
4b5afeac54 Save workflow step ID to automation email options
[MAILPOET-4515]
2022-08-08 13:23:57 +02:00
Jan Jakes
bb24838881 Save workflow ID to automation email options
[MAILPOET-4515]
2022-08-08 13:23:57 +02:00
Jan Jakes
fc11b2f97e Fix automation editor body class
We use edit-site styles now so we need to set the correct class for the footer to disappear.

[MAILPOET-4515]
2022-08-08 13:23:57 +02:00
Jan Lysý
f899eb1c16 Parse name from an email
When the settings table is empty and the current user uses an email in the name. We try to parse the name.
[MAILPOET-4501]
2022-08-08 10:42:25 +02:00
Jan Lysý
ac473c412e Use WP functions from internal class
[MAILPOET-4516]
2022-08-03 16:52:02 +02:00
Jan Lysý
679d586d2b Fix settings action link order
[MAILPOET-4516]
2022-08-03 16:52:02 +02:00
Rostislav Wolny
16807fe9e3 Update and fix comments related to usage of Action Scheduler in cron
[MAILPOET-4274]
2022-08-03 10:36:57 +02:00
Rostislav Wolny
869697e025 Allow Action Scheduler Cron trigger in cli environment
We don't want our loopback cron to run in cli environment
but we want to allow the action scheduler so that we can use it via wp cli
[MAILPOET-4274]
2022-08-03 10:36:57 +02:00
Rostislav Wolny
f745975c03 Prevent triggering migrations when tables are being removed
This was causing flakiness of acceptance test ReinstallFromScratchCest.php:reinstallFromScratch
and also potential issue for production.
In Activator::deactivate we remove MailPoet's DB tables. This takes some time.
In case there is another request during the deletion it may detect some tables are missing and trigger activation
and we end up creating MailPoet tables and removing them at the same time.

This commit adds locking to deactivate method so that any other attempt for activation ends up with an error.

[MAILPOET-4274]
2022-08-03 10:36:57 +02:00
Rostislav Wolny
b525f9f876 Deactivate action scheduler actions when another method is active
[MAILPOET-4274]
2022-08-03 10:36:57 +02:00
Rostislav Wolny
272e875643 Deactivate action scheduler recurring actions on plugin deactivation
We need to cleanup these recurring actions otherwise they would be rescheduled indefinitely.
[MAILPOET-4274]
2022-08-03 10:36:57 +02:00
Rostislav Wolny
e3fbf2421d Move action scheduler initialization to Initializer as one of first actions
[MAILPOET-4274]
2022-08-03 10:36:57 +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
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
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
Daniel Bachhuber
e53505354a Switch to SVG menu icon for Calypso compatibility
[MAILPOET-4472]
2022-07-27 09:43:42 +02:00
Rodrigo Primo
d8ad8ec97d Remove the deprecated filters mailpoet_archive_date and mailpoet_archive_subject
Those two filters were deprecated over six months ago and were scheduled
to be removed last month.

[MAILPOET-4470]
2022-07-21 16:35:09 +02:00
Rodrigo Primo
7f055aef06 Replace Paris models with Doctrine in SubscriberPersonalDataEraser
[MAILPOET-4349]
2022-07-20 15:05:19 +02:00
John Oleksowicz
c2612f4511 Shorten the max tag name from 255 to 191 chars
MySQL has maximum key lengths for indexes, and the number can vary based
 on storage engine and MySQL version. Using utf8mb4, the index would be
 255 * 4 = 1020 bytes long, exceeding the MyISAM maximum of 1000 bytes
 and the MySQL 5.6 maximum of 767 bytes.

 See Column Prefix Key Parts in the MySQL reference:
 https://dev.mysql.com/doc/refman/8.0/en/create-index.html

 By reducing this length to 191, we ensure that the maximum likely index
 length will be less than the 767 lower bound (191 * 4 = 764).

 MAILPOET-4489
2022-07-20 09:30:43 +02:00
Sam Najian
f44afbddf2 Remove SendingQueue model usages
[MAILPOET-4361]
2022-07-18 16:47:48 +02:00
Sam Najian
1814a69719 Remove SubscriberModel usages
[MAILPOET-4361]
2022-07-18 16:47:48 +02:00
Rodrigo Primo
b2ba612145 Fix: don't run the code to enable third party libraries for new installs
This commit fixes the logic of the code that enables third party
libraries by default. It was meant to enable those libraries only for
existing installs when the code was introduced in cfae753601
to avoid breaking functionality. But due to a bug, it was also enabling
those libraries for new installs.

To fix this issue, this commit moves the code to the Migrator class and
makes sure it is only executed for existing installs and only once when
doing a version update.

[MAILPOET-4285]
2022-07-12 16:01:39 +02:00
Jan Jakes
7df8342a18 Define manage automation capability in automation code
[MAILPOET-4465]
2022-07-12 13:36:58 +02:00
Jan Lysý
6b2445e8ec Move plugin style loading into assets loader
[MAILPOET-4440]
2022-07-12 13:35:00 +02:00
Jan Lysý
94524f5447 Move wordpress/components styles to higher level
[MAILPOET-4440]
2022-07-12 13:35:00 +02:00
Jan Lysý
2a74f92e10 Create tables for subscriber tags
[MAILPOET-4440]
2022-07-12 13:35:00 +02:00