Commit Graph

21402 Commits

Author SHA1 Message Date
Brezo Cordero
fb406350a5 Map ERROR_MESSAGE_BULK_EMAIL_FORBIDDEN
Create a soft error to not block sending.

[MAILPOET-5832]
2024-01-20 13:39:23 +05:00
Brezo Cordero
c65cf4d6b1 Add new API error for forbidden bulk email
[MAILPOET-5832]
2024-01-20 13:39:23 +05:00
Brezo Cordero
42618ab15c Pause sending task if sender address not valid
[MAILPOET-5832]
2024-01-20 13:39:23 +05:00
Brezo Cordero
ab23a01423 Modify the check for sender address
to implement rule for existing campaigns.

[MAILPOET-5832]
2024-01-20 13:39:23 +05:00
Brezo Cordero
56556493fe Add function isAuthorizedDomainRequiredForExistingCampaigns
[MAILPOET-5832]
2024-01-20 13:39:23 +05:00
Brezo Cordero
78faadc126 Use new function to get verified domains
It uses the overall status set by the shop instead of checking the records.

[MAILPOET-5832]
2024-01-20 13:39:23 +05:00
Pavel Dohnal
db9813a3aa Remove gradients from the new email editor
[MAILPOET-5824]
2024-01-19 13:13:27 +01:00
Pavel Dohnal
93b5158846 Fix a typo in a comment
[MAILPOET-5824]
2024-01-19 13:13:27 +01:00
Jan Jakes
0872edba99 Fix multisite tests failing on trunk
The fix for single-site was done in 895c2ad3e1,
this commit adds a fix for multisite.

[MAILPOET-5835]
2024-01-17 13:02:48 -06:00
Jan Jakes
dbd88f8313 Simplify fetching subscriber IDs
[MAILPOET-5737]
2024-01-17 22:32:37 +05:00
Rodrigo Primo
895c2ad3e1 Make sure WP user is deleted after each test
Doing this to avoid causing problems in other tests from other classes.
Without removing the WP user here we were getting the following failure
in CircleCI:

```
1) MailerTest: It can prepare subscriber for sending
 Test  tests/integration/Cron/Workers/SendingQueue/Tasks/MailerTest.php:testItCanPrepareSubscriberForSending
  [MailPoetVendor\Doctrine\DBAL\Exception\UniqueConstraintViolationException] An exception occurred while executing 'INSERT INTO mp_mailpoet_subscribers (wp_user_id, is_woocommerce_user, first_name, last_name, email, status, subscribed_ip, confirmed_ip, confirmed_at, last_subscribed_at, unconfirmed_data, source, count_confirmations, unsubscribe_token, link_token, engagement_score, engagement_score_updated_at, last_engagement_at, last_sending_at, last_open_at, last_click_at, last_purchase_at, last_page_view_at, woocommerce_synced_at, email_count, created_at, updated_at, deleted_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params [null, 0, "John", "Doe", "test@example.com", "subscribed", null, null, null, "2023-11-23 19:31:34", null, "unknown", 0, null, null, null, null, null, null, null, null, null, null, null, 0, "2023-11-23 19:31:34", "2023-11-23 19:31:34", null]:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'test@example.com' for key 'email'
```

https://app.circleci.com/pipelines/github/mailpoet/mailpoet/16312/workflows/c241bba8-27b9-411e-aa60-ab51af4efc58/jobs/276761?invite=true#step-105-405846_52

[MAILPOET-5737]
2024-01-17 22:32:37 +05:00
Rodrigo Primo
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
Rodrigo Primo
1a1f48eb15 Replace SendingQueue model with Doctrine in SendingQueueTest
I opted to remove testItDeletesQueueWhenNewsletterIsNotFound() as I
wasn't sure how to recreate this test using Doctrine and I found out
that it was actually not working. The call to
$this->newslettersRepository->bulkDelete() was deleting the sending
queue entry and not SendingQueue::deleteTaskIfNewsletterDoesNotExist().

[MAILPOET-5737]
2024-01-17 22:32:37 +05:00
Rodrigo Primo
33769e703c Replace StatisticsNewsletters model with Doctrine in SendingQueue
[MAILPOET-5737]
2024-01-17 22:32:37 +05:00
Rodrigo Primo
4fe642916e Replace Newsletter model with Doctrine in SendingQueue
[MAILPOET-5737]
2024-01-17 22:32:37 +05:00
Rodrigo Primo
d8973fe925 Add methods to set senderName, replyToName and replyToAddress
This commit expands the newsletter factory class and adds three new
methods.

[MAILPOET-5737]
2024-01-17 22:32:37 +05:00
Rodrigo Primo
83826b3f65 Replace Subscriber model with Doctrine in SendingQueue and SendingQueueTest
[MAILPOET-5737]
2024-01-17 22:32:37 +05:00
Rodrigo Primo
5ac874c713 Replace Newsletter and NewsletterSegment models with Doctrine
[MAILPOET-5737]
2024-01-17 22:32:37 +05:00
Rodrigo Primo
9725e300f3 Fix bug in testItCanProcessWelcomeNewsletters() test
This test was checking that the status of a welcome email is set to
`sent` after it is processed. Turns out this is not what should happen
and also not what is actually happen. The code only changes the status
of emails of the types standard and notification history:

7d43059f15/mailpoet/lib/Cron/Workers/SendingQueue/Tasks/Newsletter.php (L285-L286)

The test changes the type of the email to welcome
using Paris and never persists it to the database. The code mentioned
above that changes the status of the email uses Doctrine, so it was
still acting as if this was an standard email and not a welcome email.

To fix this problem, I updated the test to check if the status of the
welcome email is `active` and also made sure to persist the change to
the database and refresh the Doctrine entity.

[MAILPOET-5737]
2024-01-17 22:32:37 +05:00
Rodrigo Primo
4f333e3ae8 Replace StatisticsNewsletters model with Doctrine
[MAILPOET-5737]
2024-01-17 22:32:37 +05:00
Rodrigo Primo
a9952cf394 Replace Segment model with Doctrine in SendingQueueTest
[MAILPOET-5737]
2024-01-17 22:32:37 +05:00
Rodrigo Primo
abd19a6e6e Replace SubscriberSegment model with Doctrine in SendingQueueTest
[MAILPOET-5737]
2024-01-17 22:32:37 +05:00
Jan Jakes
fb1feca7de Bump WooCommerce versions: minimum to 8.4, tested up to 8.5
[MAILPOET-5834]
2024-01-17 16:43:51 +01:00
David Remer
b43eac8af3 Release 4.41.3 2024-01-16 20:15:32 +02:00
David Remer
f88a33bc7d Revert "Release 4.41.3"
This reverts commit a50fcc67ba.
2024-01-16 20:15:32 +02:00
Jan Jakes
aa96d72bea Remove double wrap from automation listing page
[MAILPOET-5779]
2024-01-16 18:15:35 +01:00
Jan Jakes
e6f01119d5 Make legacy automatic emails/automations notices permanently dismissable
[MAILPOET-5779]
2024-01-16 18:15:35 +01:00
Jan Jakes
31858eb2a5 Fix automation listing title size
[MAILPOET-5779]
2024-01-16 18:15:35 +01:00
Jan Jakes
ad1c9320e3 Highlight automations menu on legacy automatic email analytics page
[MAILPOET-5779]
2024-01-16 18:15:35 +01:00
Jan Jakes
e0b6cf7b41 Unify responses of newsletter editing API methods with get()
[MAILPOET-5779]
2024-01-16 18:15:35 +01:00
Jan Jakes
a50fcc67ba Release 4.41.3 2024-01-16 18:15:35 +01:00
Jan Lysý
6dba7b3afc Use min function for better readability
[MAILPOET-5788]
2024-01-16 12:22:54 +01:00
Jan Lysý
1030d521c0 Use constant from SettingsController in image renderer
[MAILPOET-5788]
2024-01-16 12:22:54 +01:00
Jan Lysý
932f47b763 Fix image block rendering when image is not set
[MAILPOET-5788]
2024-01-16 12:22:54 +01:00
Jan Lysý
2fc3860512 Fix background color for full-width columns
[MAILPOET-5788]
2024-01-16 12:22:54 +01:00
Jan Lysý
fb2d89cb81 Fix rendering images with higher width than newsletter
[MAILPOET-5788]
2024-01-16 12:22:54 +01:00
Jan Lysý
56c566d189 Update Image block test
[MAILPOET-5788]
2024-01-16 12:22:54 +01:00
Jan Lysý
da16f50d33 Refactor core/image renderer for better compatibility with Outlook
[MAILPOET-5788]
2024-01-16 12:22:54 +01:00
Jan Lysý
79e6cd16e8 Fix centered image alignment when it's nested in column
[MAILPOET-5788]
2024-01-16 12:22:54 +01:00
Jan Jakes
5d006c87e7 Fix duplicate component key on automation listing page
[MAILPOET-5779]
2024-01-16 09:43:57 +05:00
Jan Jakes
f4ac59f685 Add saved/activated notices when redirecting back to automation listing
[MAILPOET-5779]
2024-01-16 09:43:57 +05:00
Jan Jakes
c1f2d48811 Fix and simplify automation listing notices, use @wordpress/notices
[MAILPOET-5779]
2024-01-16 09:43:57 +05:00
Jan Jakes
47ac9dbad5 Fix redirects to email listings after moving legacy automatic emails
[MAILPOET-5779]
2024-01-16 09:43:57 +05:00
Jan Jakes
c1909d2d30 Make legacy automatic emails notice closable
[MAILPOET-5830]
2024-01-16 09:43:57 +05:00
Jan Jakes
d9eeb5f56e Add missing button variant 2024-01-16 09:43:57 +05:00
Brezo Cordero
1162b5aca1 Verify sender Address on newsletter activation
[MAILPOET-5786]
2024-01-15 19:34:21 +05:00
Brezo Cordero
f3693f4afd Add function to verify sender Address on activation
[MAILPOET-5786]
2024-01-15 19:34:21 +05:00
Brezo Cordero
04c16042cd Apply activation restrictions
[MAILPOET-5786]
2024-01-15 19:34:21 +05:00
Brezo Cordero
4a9d57766b Add activation restrictions to window
[MAILPOET-5786]
2024-01-15 19:34:21 +05:00
Brezo Cordero
3b3be51324 Add functions to check activation restrictions
[MAILPOET-5786]
2024-01-15 19:34:21 +05:00