Commit Graph

16368 Commits

Author SHA1 Message Date
Jan Jakes
0792bae953 Fix workflow activation discarding unsaved changes
[MAILPOET-4515]
2022-08-08 13:23:57 +02:00
Jan Jakes
4389d3ca5f Sync automation email step settings to newsletter entity
[MAILPOET-4515]
2022-08-08 13:23:57 +02:00
Jan Jakes
15e4635fe3 Add hook registration helper methods to registry
[MAILPOET-4515]
2022-08-08 13:23:57 +02:00
Jan Jakes
da58a5c416 Trigger workflow and step before save hooks
[MAILPOET-4515]
2022-08-08 13:23:57 +02:00
Jan Jakes
87f35abf8b Add workflow and step before save hooks
[MAILPOET-4515]
2022-08-08 13:23:57 +02:00
Jan Jakes
a6cbf99ee5 Fix wrong ...$args typehints
[MAILPOET-4515]
2022-08-08 13:23:57 +02:00
Jan Jakes
2faf0739a3 Check that step implementation exists when saving workflow
[MAILPOET-4515]
2022-08-08 13:23:57 +02:00
Jan Jakes
cc2f908236 Add registry methods for step interface implementations
[MAILPOET-4515]
2022-08-08 13:23:57 +02:00
Jan Jakes
ebe8d5d478 Add step interface as a parent of action and trigger
[MAILPOET-4515]
2022-08-08 13:23:57 +02:00
Jan Jakes
4aa323b612 Extract data-carrying classes to dedicated namespace
We need a separation of "Step" as an interface vs. "Step" as a serializable data structure.

[MAILPOET-4515]
2022-08-08 13:23:57 +02:00
Jan Jakes
fbd27afedf Move step runner interface to the control namespace
[MAILPOET-4515]
2022-08-08 13:23:57 +02:00
Jan Jakes
ca308321fd Rename step runner to handler (free the name to step runner interface)
[MAILPOET-4515]
2022-08-08 13:23:57 +02:00
Jan Jakes
c9aa53df8b Extract workflow step updating to a separate controller
[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ý
18501385dc Extend integration test for filters
[MAILPOET-4442]
2022-08-08 10:57:42 +02:00
Jan Lysý
c917505170 Add acceptance test with filtering by tag
[MAILPOET-4442]
2022-08-08 10:57:42 +02:00
Jan Lysý
0b14a03236 Disable margin left for second select in a row
[MAILPOET-4442]
2022-08-08 10:57:42 +02:00
Jan Lysý
2b5d089a79 Add tag filter into subscribers response
[MAILPOET-4442]
2022-08-08 10:57:42 +02:00
Jan Lysý
5445bf9305 Add tags statistics method
[MAILPOET-4442]
2022-08-08 10:57:42 +02:00
Jan Lysý
98d9952a44 Fix prefetching subscriber relations
[MAILPOET-4501]
2022-08-08 10:57:42 +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
Rodrigo Primo
e93befc965 Rename popup message over list/segment badges to 'View subscribers'
[MAILPOET-4505]
2022-08-08 09:04:34 +02:00
Rostislav Wolny
c8278dde2a Use correct exception type when saving segment to DB fails
[MAILPOET-4294]
2022-08-04 13:31:53 +02:00
Rostislav Wolny
1d4ec47b25 Move tests for addList under the related service test
[MAILPOET-4294]
2022-08-04 13:31:53 +02:00
Rostislav Wolny
9c5dca0206 Refactor MailPoet\API\MP\v1\API::addList to doctrine
[MAILPOET-4294]
2022-08-04 13:31:53 +02:00
Rodrigo Primo
73f51523f3 Replace Paris models with Doctrine entities in SubscriberLinkTokens
[MAILPOET-4345]
2022-08-04 11:52:57 +02:00
Rodrigo Primo
d3abbddf73 Add a basic integration test to cover the happy path of SubscriberLinkTokens
[MAILPOET-4345]
2022-08-04 11:52:57 +02:00
Rodrigo Primo
56b90247b2 Add method to set the link_token to the Subscriber factory
[MAILPOET-4345]
2022-08-04 11:52:57 +02:00
Rodrigo Primo
4a8ac483f6 Use getServiceWithOverrides() instead of instantiating the tested class
This commit changes the way InactiveSubscribersTest
instantiates the tested class InactiveSubscribers. Instead of calling it
directly, it uses \MailPoetTest::getServiceWithOverrides(). This way, we
don't have to update all the tests when there is a change to the
signature of the constructor of the tested class.

[MAILPOET-4344]
2022-08-04 11:10:50 +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
Rodrigo Primo
0f7a3c3e00 Replace Paris models with Doctrine entities in SimpleWorkerTest
[MAILPOET-4344]
2022-08-04 11:10:50 +02:00
Rodrigo Primo
8a29519b31 Replace Paris models with Doctrine entities in InactiveSubscribers
[MAILPOET-4344]
2022-08-04 11:10:50 +02:00
Rodrigo Primo
261f2eaa25 Replace Paris models with Doctrine entities in Shortcodes
[MAILPOET-4364]
2022-08-04 10:55:03 +02:00
Rodrigo Primo
4a0ee78467 Replace Paris models with Doctrine entities in ShortcodesTest
[MAILPOET-4364]
2022-08-04 10:55:03 +02:00
Rodrigo Primo
de4e76b65d Use is_array() instead of !empty() for a safer check
Just in case the option is changed and is not an array anymore.

[MAILPOET-4491]
2022-08-04 10:18:44 +02:00
Rodrigo Primo
ffecdf8528 Use update_option() instead of add_option()
See https://github.com/mailpoet/mailpoet/pull/4277#discussion_r933531137

[MAILPOET-4491]
2022-08-04 10:18:44 +02:00
Rodrigo Primo
ef89cae94a Include in the Beacon info about if MP was installed via WC or not
[MAILPOET-4491]
2022-08-04 10:18:44 +02:00
Rodrigo Primo
6a5207a366 Add new property to pass to Mixpanel to track if MP was installed via WC
[MAILPOET-4491]
2022-08-04 10:18:44 +02:00
Rodrigo Primo
13e06fe0cb Add helper method to check if MailPoet was installed via WooCommerce
The method will return true if MailPoet was installed via the
WooCommerce onboarding wizard and false otherwise.

[MAILPOET-4491]
2022-08-04 10:18:44 +02:00
Sam Najian
57c02a2fd3 Inline form honey pot css style
Inline !important styling has more specificity that styling
added inside style tag, and is more likely to work on more
devices

[MAILPOET-4519]
2022-08-04 10:10:16 +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
Rodrigo Primo
85e7997197 Replace Paris models with Doctrine entities in AuthorizedEmailsController
[MAILPOET-4347]
2022-08-03 16:27:41 +02:00
Rodrigo Primo
d225f4e044 Replace Paris models with Doctrine entities in AuthorizedEmailsControllerTest
[MAILPOET-4347]
2022-08-03 16:27:41 +02:00
Rodrigo Primo
e7b32bdd4a Add method to set the status when creating a new Newsletter entity
This commit adds the method withStatus() to the newsletter factory
class so that it is possible to pass a variable with the status to the
factory. Before this change, it was necessary to class methods like
withActiveStatus() which make it impossible to create newsletters with
different status in the same call. This will be used in a subsequent
commit that is part of the same ticket to refactor
AuthorizedEmailsControllerTest.

[MAILPOET-4347]
2022-08-03 16:27:41 +02:00
Rostislav Wolny
b89a931e1a Improve CSS reset for fieldset and legend in form
These changes address issues found when testing with Storefront theme.
[MAILPOET-4471]
2022-08-03 11:27:06 +02:00
Rostislav Wolny
c170641d83 Fix form checkbox html
[MAILPOET-4471]
2022-08-03 11:27:06 +02:00
Rostislav Wolny
35d9a6b2d3 Update form acceptance test check
[MAILPOET-4471]
2022-08-03 11:27:06 +02:00
Rostislav Wolny
6777a9b560 Update unit tests to reflect form rendering changes
[MAILPOET-4471]
2022-08-03 11:27:06 +02:00
Rostislav Wolny
bf5d27cc79 Unify error message for invalid email with other messages
Other error messages are also ended with period.
[MAILPOET-4471]
2022-08-03 11:27:06 +02:00