Commit Graph

16613 Commits

Author SHA1 Message Date
b371c631c4 Add helper mu-plugin for adding COT in tests
When plugin is active COT is enabled. The plugin also adds WP CLI command
for creating custom order tables so that we don't have to do it via admin UI.
[MAILPOET-4572]
2022-09-19 11:38:03 -03:00
82218ca48c Add ./do reset:test-docker command
We already have a similar command ./do delete:docker which removes everything
related to docker for test environment including images.
This is an overkill in case one wants to do just basic cleanup of container and volumes e.g. to allow
activation of a different version of WooCommerce
[MAILPOET-4572]
2022-09-19 11:38:03 -03:00
910ded0f30 Add temporary command for downloading WooCommerce build with COT
[MAILPOET-4572]
2022-09-19 11:38:03 -03:00
f2e355f7d5 Refactor building newsletters lists
Because some customers have a memory issue when we load all newsletters.
I used partial loading newsletters to prevent this error that was caused by json in the newsletter body.
[MAILPOET-4646]
2022-09-19 14:32:55 +02:00
6e399a5842 Replace getSubscribedSegments() with a new getSubscriberSegments() parameter
After the PR review, we decided to add a new $status parameter to
getSubscriberSegments() instead of creating getSubscribedSegments().

[MAILPOET-4365]
2022-09-19 13:35:39 +02:00
f21c47528e Use findBy() instead of getReference() to get segment entities
Initially, I had opted to use getReference() to avoid querying the
database to get the segment entities as all we need is the segment ID.
But I hadn't realized that this could cause problems if a segment that
is saved in the settings in the option woocommerce.segments is deleted.
Using findBy() here protects against this problem as, if the segment
doesn't exist anymore, it won't be returned.

[MAILPOET-4365]
2022-09-19 13:35:39 +02:00
6bf36d4211 Make sure the subscriber_segment table is truncated
This is necessary while
https://mailpoet.atlassian.net/browse/MAILPOET-4580. Without this
change, leaving entries in wp_mailpoet_subscriber_segment has the
potential to interfere with other tests as it happened in the test added
for the ticket MAILPOET-4365:

https://app.circleci.com/pipelines/github/mailpoet/mailpoet/11041/workflows/8cca6607-2e24-4529-a8ad-cf9a0c663180/jobs/191334/tests#failed-test-0

See MAILPOET-4580 for more details.

[MAILPOET-4365]
2022-09-19 13:35:39 +02:00
5610295e7a Replace SubscriberSegment model with Doctrine code in Subscription
[MAILPOET-4365]
2022-09-19 13:35:39 +02:00
a428e16a09 Replace remaining uses of the Segment model with Doctrine in Subscription
[MAILPOET-4365]
2022-09-19 13:35:39 +02:00
d73e217eb1 Replace Paris models with Doctrine entities in Subscription::subscribeOnCheckout()
Besides Subscription::subscribeOnCheckout(), this commit also replaces
Paris models with Doctrine entities in all the methods that are called
by Subscription::subscribeOnCheckout().

[MAILPOET-4365]
2022-09-19 13:35:39 +02:00
fa1f88c86a Use getServiceWithOverrides() to instantiated tested class
Doing this instead of calling the constructor of the class directly to
avoid having to update the test class whenever there is a change to the
constructor of the tested class.

[MAILPOET-4365]
2022-09-19 13:35:39 +02:00
de6a0b4790 Add method to get segments that a subscriber is subscribed to
[MAILPOET-4365]
2022-09-19 13:35:39 +02:00
24f55fdebc Use SubscriberEntity instead of the Subscriber model to get statuses
[MAILPOET-4365]
2022-09-19 13:35:39 +02:00
b225c22217 Replace Paris models with Doctrine entities in WooCommerceBlocksIntegration
[MAILPOET-4365]
2022-09-19 13:35:39 +02:00
6989bd9413 Make limit parameter optional
Unification function parameters with a similar method from the repository.
[MAILPOET-4367]
2022-09-19 11:07:16 +02:00
1a65e815b4 Add integration test for findScheduledSendingTasks
[MAILPOET-4367]
2022-09-19 11:07:16 +02:00
bc8be524fb Use ScheduledTaskEntity instead of Sending
[MAILPOET-4367]
2022-09-19 11:07:16 +02:00
cb4fabad4a Remove the Sending::getScheduledQueues() method
[MAILPOET-4367]
2022-09-19 11:07:16 +02:00
97801cfe25 Remove usage of Sending::getScheduledQueues
[MAILPOET-4367]
2022-09-19 11:07:16 +02:00
9e7a3c2767 Add method for finding scheduled tasks
[MAILPOET-4367]
2022-09-19 11:07:16 +02:00
abfab0b0ea Use currentTimme from WP
[MAILPOET-4367]
2022-09-19 11:07:16 +02:00
71635f9520 Add removing tags when subscriber is deleted
[MAILPOET-4558]
2022-09-15 11:26:10 +02:00
daa5575d87 Reduce maximum records count in batch to exact size
[MAILPOET-4558]
2022-09-15 11:26:10 +02:00
2364db4834 Use tags from MailPoet object instead of window
[MAILPOET-4558]
2022-09-15 11:26:10 +02:00
5733bdcb42 Extend acceptance test with importing tags
[MAILPOET-4558]
2022-09-15 11:26:10 +02:00
d76d4e95b8 Hide label for tokenField and add placeholder
[MAILPOET-4558]
2022-09-15 11:26:10 +02:00
ba81018a9d Add test for tagging imported subscribers
[MAILPOET-4558]
2022-09-15 11:26:10 +02:00
5c57dd2006 Add saving tags for imported subscribers
[MAILPOET-4558]
2022-09-15 11:26:10 +02:00
a523bb493f Add a token field with tags to the import form
[MAILPOET-4558]
2022-09-15 11:26:10 +02:00
a89d8afc34 Use property subscriberTags instead of string
[MAILPOET-4564]
2022-09-15 10:17:35 +02:00
6a88bf04f2 Extend tags component by subscriber tags filtering
[MAILPOET-4564]
2022-09-15 10:17:35 +02:00
9187e1118a Add dot at the end of the sentence
[MAILPOET-4506]
2022-09-15 09:35:50 +02:00
5e18de4921 Unify error messages in the sending step
[MAILPOET-4506]
2022-09-15 09:35:50 +02:00
856b20a4d1 Disable subscribers count validation for draft
[MAILPOET-4506]
2022-09-15 09:35:50 +02:00
7ebb1a0b13 Change validation that at least one segment with subscribers is enough
[MAILPOET-4506]
2022-09-15 09:35:50 +02:00
40d77bc88f Add parsley custom validator for segments
[MAILPOET-4506]
2022-09-15 09:35:50 +02:00
83413e4fe5 Unify error message for unauthorized email
[MAILPOET-4506]
2022-09-15 09:35:50 +02:00
bf5fbf0b58 Improve form styles for parsley errors
[MAILPOET-4506]
2022-09-15 09:35:50 +02:00
9e607f41ec Disable auto-close for error messages
[MAILPOET-4506]
2022-09-15 09:35:50 +02:00
c9c48aae1e Do not import @wordpress/components
They are already imported in mailpoet-plugin.scss

[MAILPOET-4355]
2022-09-15 08:08:07 +02:00
b237503883 Do not enqueue wp-components styles
[MAILPOET-4533]
2022-09-15 08:08:07 +02:00
5d5e7d76e5 Use mapper function to return workflow data
[MAILPOET-4533]
2022-09-15 08:08:07 +02:00
339cba3c42 Throw InvalidStateException when workflow is not found
[MAILPOET-4533]
2022-09-15 08:08:07 +02:00
a07052c834 Use automation prefix for classNames
[MAILPOET-4533]
2022-09-15 08:08:07 +02:00
0748e64ac0 Make 'From scratch' button secondary
[MAILPOET-4533]
2022-09-15 08:08:07 +02:00
227b0a9b81 Activate mailpoet-automation submenu
[MAILPOET-4533]
2022-09-15 08:08:07 +02:00
eb5b21410e Link automation templates
[MAILPOET-4533]
2022-09-15 08:08:07 +02:00
32f5e3873e Expose @wordpress/url and @wordpress/i18n
[MAILPOET-4533]
2022-09-15 08:08:07 +02:00
7803b7938f Add FromScratchListItem
[MAILPOET-4533]
2022-09-15 08:08:07 +02:00
a05da8adad Adjust layout of templates listing
[MAILPOET-4533]
2022-09-15 08:08:07 +02:00