Commit Graph

21439 Commits

Author SHA1 Message Date
d62f3c1938 Render email main font family CSS rules in the content wrapper
[MAILPOET-5740]
2024-01-23 16:47:48 +01:00
2573042431 Remove default content styles
These are no longer needed.
I also found that the settings for font-size for headings were
not used anywhere.
[MAILPOET-5740]
2024-01-23 16:47:48 +01:00
c4586d60e9 Move the default font family and font size settings to the theme.json
[MAILPOET-5740]
2024-01-23 16:47:48 +01:00
07e6940162 Add the basic list of font families
Add basic font families. For now, we use know-how from the current editor
and we use the same list of fonts as were used in the current editor
[MAILPOET-5740]
2024-01-23 16:47:48 +01:00
e8bb1b5ac0 Refactor font family rendering using CSS inlining
We don't reset font family on any level, so there is no need to
bubble the setting using a preprocessor and render the inline styles
explicitly in every block.

In this commit, I change how font-family settings are distributed/rendered
in the email renderer. In the new approach, we rely on class names defining font-family
and a generated CSS sheet with font-family definitions.
We apply the font-family CSS by inlining CSS rules for families in the later phase of
rendering after all individual blocks are processed.
[MAILPOET-5740]
2024-01-23 16:47:48 +01:00
a7aaf97070 Improve typography preprocessor to get font family value from slugs
[MAILPOET-5740]
2024-01-23 16:47:48 +01:00
3cb469a11b Apply font-family set by user in button block
[MAILPOET-5740]
2024-01-23 16:47:48 +01:00
890050fdc8 Fix font-family processing in the typography preprocessor.
The font-family property is not included under styles but at the top level
of block attributes.
[MAILPOET-5740]
2024-01-23 16:47:48 +01:00
429f0ce081 Enable font family selection in email editor
Initially, we use just basic serif and sans serif fonts.
[MAILPOET-5740]
2024-01-23 16:47:48 +01:00
f395580954 Release 4.42.0 2024-01-23 09:42:20 -06:00
7acc6d74bc Change PHP base image for local environment
For better functionality of WordPress on local env, I changed the base image for PHP.
[MAILPOET-5749]
2024-01-22 17:32:41 +01:00
38fcb7394d Move hook adding MailPoet image size to NewsletterEditor admin page
[MAILPOET-5749]
2024-01-22 17:32:41 +01:00
9a6ee9c46a Enabling AutomateWoo acceptance tests
[MAILPOET-5721]
2024-01-22 14:48:00 +01:00
6e38762d6d Hide AutomateWoo checkout opt-in block so only one checkbox is visible
[MAILPOET-5721]
2024-01-22 14:48:00 +01:00
e75f833016 Make it obvious the list name can be visible by subscribers
[MAILPOET-5841]
#5377
2024-01-22 13:04:46 +01:00
77e3bfa823 Update link for banned users
[MAILPOET-5825]
2024-01-22 12:24:16 +01:00
bd0b485d15 Add translate.wordpress.com to readme
[MAILPOET-5826]
2024-01-22 12:11:47 +01:00
e9509aa0a8 Make strings translateable
[MAILPOET-5826]
2024-01-22 12:11:47 +01:00
7af8696acd Add Crowdsignal to readme
[MAILPOET-5826]
2024-01-22 12:11:47 +01:00
172daa5c64 Load crowdsignal script only when 3rd parties are enabled
If they are disabled, show an external link to the poll

[MAILPOET-5826]
2024-01-22 12:11:47 +01:00
0f0566c8b1 Extend readme and add beamer
[MAILPOET-5826]
2024-01-22 12:11:47 +01:00
836a23c1be Prevent Worker from running when 3rd parties are disabled
[MAILPOET-5826]
2024-01-22 12:11:47 +01:00
7defccd834 Test that the beamer background task does not run when 3rd parties are not enabled
[MAILPOET-5826]
2024-01-22 12:11:47 +01:00
738bcc69ef Do not show the Updates-button when 3rd parties are not enabled
[MAILPOET-5826]
2024-01-22 12:11:47 +01:00
f15332c1d4 Add TOS and Privacy Policy links to existing services
[MAILPOET-5826]
2024-01-22 12:11:47 +01:00
fcbe0e86a8 Add links to existing services
[MAILPOET-5826]
2024-01-22 12:11:47 +01:00
37d3e61bd2 Ignore ORMInvalidArgumentException when trying to remove the SendingQueueEntity
When a newsletter gets deleted in the Newsletter Repository the associated SendingQueueEntity gets removed.
This can happen and afterwards the SendingTask gets deleted. In these cases, we catch the error that
the entity can not be removed and continue the process.

[MAILPOET-5829]
2024-01-20 14:02:52 +05:00
b0c42248a3 Detach entities when bulk deleting Newsletters
[MAILPOET-5829]
2024-01-20 14:02:52 +05:00
9624ce4e0a Allow to detach different entities
[MAILPOET-5829]
2024-01-20 14:02:52 +05:00
6d86cc9983 Improve readability
[MAILPOET-5832]
2024-01-20 13:39:23 +05:00
dffebc231e Add comment on check for PAUSED task during batch processing
[MAILPOET-5832]
2024-01-20 13:39:23 +05:00
5a4140c65a Improve readability
[MAILPOET-5832]
2024-01-20 13:39:23 +05:00
d76aec0431 Add return type
[MAILPOET-5832]
2024-01-20 13:39:23 +05:00
b80f71f8c2 Remove unused code
[MAILPOET-5832]
2024-01-20 13:39:23 +05:00
4a0ed51c8c Reduce API calls to verify sender domain during sending
and call checkAuthorizedEmailAddresses on bulk email sending error.

[MAILPOET-5832]
2024-01-20 13:39:23 +05:00
9d8de3b3cf Use a transient to store sender domains
to reduce API calls.

[MAILPOET-5832]
2024-01-20 13:39:23 +05:00
e7aa261828 Process Soft error for domain authorization
Pause the task and do not update counts.

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

[MAILPOET-5832]
2024-01-20 13:39:23 +05:00
56556493fe Add function isAuthorizedDomainRequiredForExistingCampaigns
[MAILPOET-5832]
2024-01-20 13:39:23 +05:00
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
db9813a3aa Remove gradients from the new email editor
[MAILPOET-5824]
2024-01-19 13:13:27 +01:00
93b5158846 Fix a typo in a comment
[MAILPOET-5824]
2024-01-19 13:13:27 +01:00
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
dbd88f8313 Simplify fetching subscriber IDs
[MAILPOET-5737]
2024-01-17 22:32:37 +05:00
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
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
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