Commit Graph

732 Commits

Author SHA1 Message Date
Pavel Dohnal
5d967f3457 Use a single string instead of array of strings
[MAILPOET-3625]
2021-08-23 14:18:57 +02:00
Pavel Dohnal
3d1e2c5a2e Refactor setupWooCommerceInitialImport to Doctrine
[MAILPOET-3625]
2021-08-23 14:18:57 +02:00
Jan Lysý
a9621875bd Fix phpstan errors from new version
[MAILPOET-3725]
2021-08-16 15:56:39 +02:00
Rodrigo Primo
55dc8ac902 Protect against fatal error when rendering e-mail styles
This commit protects the code that renders styles for e-mails against a
fatal error that could happen if the variable $styles passed to Renderer::renderStyles()
is not an array of arrays. To do that, the code will now check if each value
of the array is an array. If not, we move on to the next value instead of
calling StylesHelper::setStyle(). I also added type hints to
StylesHelper::setStyle() and some of the methods that it calls to make
it more explicit what it expects to receive and what it returns.

[MAILPOET-3731]
2021-08-16 14:36:15 +02:00
Jan Lysý
f6a881da98 Remove redundant important from style
We test stripping redundant from rendered emails. I removed redundant important option.
It is based on this article:
https://www.litmus.com/blog/a-guide-to-bulletproof-buttons-in-email-design/

[MAILPOET-3468]
2021-08-16 11:44:41 +02:00
Jan Lysý
dfa0d03a67 Replace incorrect opening mso if in postProcessTemplate
[MAILPOET-3468]
2021-08-16 11:44:41 +02:00
Jan Lysý
75690d7a45 Add non mso condition around button
[MAILPOET-3468]
2021-08-16 11:44:41 +02:00
Jan Lysý
7783237203 Use entities instead of old models in link shortcode filter
[MAILPOET-3464]
2021-08-11 14:35:48 +02:00
Rodrigo Primo
e59992cc16 Fix checkGenericClassInNonGenericObjectType PHPStan errors
This commit removes the checkGenericClassInNonGenericObjectType flag
from PHPStan configuration files and fixes all associated errors in our
code base.

[MAILPOET-3236]
2021-08-09 12:58:56 +02:00
Rostislav Wolny
7a3ffa388f Update PHPStan
[MAILPOET-3658]
2021-07-06 13:29:00 +02:00
Rostislav Wolny
65b834a9ff Update renamed NotCamelCaps rule
[MAILPOET-3658]
2021-07-06 13:29:00 +02:00
Jan Lysý
7d49d39efc Use Doctrine entities in SubscriptionUrlFactory
[MAILPOET-3269]
2021-06-14 10:12:34 +02:00
Jan Lysý
aeeceeeb8d Use Newsletter\Url as service
[MAILPOET-3269]
2021-06-14 10:12:34 +02:00
Jan Lysý
c9636ebf1b Use Newsletter\Links as service
[MAILPOET-3269]
2021-06-14 10:12:34 +02:00
Jan Lysý
8826b01ec9 Remove static calling from Newsletter/Links
[MAILPOET-3269]
2021-06-14 10:12:34 +02:00
Jan Lysý
85b9d5b7e4 Use Doctrine entity in calling LinkTokens::verifyToken
[MAILPOET-3269]
2021-06-14 10:12:34 +02:00
Jan Lysý
f3586dfe2e Create WC content preprocessor
[MAILPOET-3638]
2021-06-14 09:46:19 +02:00
Jan Lysý
c1ffc12e1a Use placeholder block for WooCommerce preprocessing
[MAILPOET-3638]
2021-06-14 09:46:19 +02:00
Jan Lysý
4d5801caa3 Create block placeholder
[MAILPOET-3638]
2021-06-14 09:46:19 +02:00
Pavel Dohnal
7857b95fde Add a comment about unsupported blocks
[MAILPOET-3437]
2021-06-01 10:02:30 +02:00
Pavel Dohnal
70b2b3c40e Remove unused code
[MAILPOET-3267]
2021-05-31 13:32:10 +02:00
Pavel Dohnal
7426479631 Remove usage of deprecated method
[MAILPOET-3267]
2021-05-31 13:32:10 +02:00
Pavel Dohnal
9e44ee74a6 Create a doctrine version for isSubscriberProcessed
[MAILPOET-3267]
2021-05-31 13:32:10 +02:00
Pavel Dohnal
df7b961768 Fix 1px line rendering bug in Outlook 2016
[MAILPOET-3448]
2021-05-26 09:34:58 +02:00
Jan Lysý
95fc533649 Fix getting automated content for type media
[MAILPOET-3542]
2021-05-25 17:59:08 +02:00
Rostislav Wolny
39f8dfae5b Sanitize only specific block types in newsletter API data
[MAILPOET-3538]
2021-05-03 14:20:07 +02:00
Jan Lysý
13b4c74c00 Use Doctrine in SubscriberActions integration tests
[MAILPOET-3032]
2021-04-12 14:26:36 +02:00
Rodrigo Primo
030bd8c1c8 Fix PHPStan parameter type error introduced after update to version 0.12.83
This commit fixes the following PHPStan errors introduced after the update to version 0.12.83:

```
 ------ ----------------------------------------------------------------------
  Line   lib/Newsletter/Renderer/Blocks/Footer.php
 ------ ----------------------------------------------------------------------
  18     Parameter #1 $html of method MailPoet\Util\pQuery\pQuery::parseStr()
         expects string, array|string|null given.
 ------ ----------------------------------------------------------------------

 ------ ----------------------------------------------------------------------
  Line   lib/Newsletter/Renderer/Blocks/Header.php
 ------ ----------------------------------------------------------------------
  18     Parameter #1 $html of method MailPoet\Util\pQuery\pQuery::parseStr()
         expects string, array|string|null given.
 ------ ----------------------------------------------------------------------
```

[MAILPOET-3491]
2021-04-12 08:55:14 +02:00
Rostislav Wolny
51e5206ed8 Fix trashing check to check also welcome and automatic emails
[MAILPOET-3463]
2021-03-29 12:42:21 +02:00
Rostislav Wolny
fc66381da2 Remove client side checks for trashing lists
[MAILPOET-3463]
2021-03-29 12:42:21 +02:00
Rostislav Wolny
f066bc8fdd Disallow trashing single dynamic segment with active email
[MAILPOET-3463]
2021-03-29 12:42:21 +02:00
wxa
873677ee3e Inject WPFunctions into Shortcodes class
[MAILPOET-3465]
2021-03-22 12:19:59 +01:00
wxa
4ea2337814 Add WP style shortcodes support to emails
Also pass shortcode arguments to custom shortcode functions

[MAILPOET-3465]
2021-03-22 12:19:59 +01:00
Jan Lysý
7968db94ff Update integration tests for usage SubscribersRepository
[MAILPOET-3268]
2021-03-16 14:39:47 +01:00
Jan Lysý
dffaab10a2 Use getCurrentWPUser from SubscribersRepository
[MAILPOET-3268]
2021-03-16 14:39:47 +01:00
Pavel Dohnal
deb4d7833d Fix text align
[MAILPOET-3473]
2021-03-15 09:54:46 +01:00
Pavel Dohnal
8608bc7875 Use newsletter sent at in dates shortcode
[MAILPOET-3375]
2021-03-10 14:38:05 +01:00
Jan Lysý
878e3eb28f Simplify newsletter body data repair
[MAILPOET-3430]
2021-03-02 13:48:07 +01:00
Jan Lysý
9441d32bdd Use service for fix newsletter API data
[MAILPOET-3430]
2021-03-02 13:48:07 +01:00
Jan Lysý
e443e3918d Add service for fixing newsletter API data
[MAILPOET-3430]
2021-03-02 13:48:07 +01:00
Jan Lysý
93e97717f7 Add missing return type to NewsletterOptionsRepository
[MAILPOET-3378]
2021-02-18 10:13:44 +01:00
Jan Lysý
09acbb0d07 Use Doctrine instead of Paris in Import
[MAILPOET-3378]
2021-02-18 10:13:44 +01:00
Pavel Dohnal
aad1495262 Prevent deleting lists with emails that are being sent
[MAILPOET-3417]
2021-02-17 16:31:31 +01:00
Rostislav Wolny
dc4727117c Fix view in browser link shortcode and extend test
[MAILPOET-3434]
2021-02-17 16:11:59 +01:00
Pavel Dohnal
5b5e01465c [MAILPOET-3408] 2021-02-10 14:52:20 +01:00
Jan Lysý
9e9270f13b Use email heading from Woo for email header
We want to use email heading from Woo in title of rendered email for
WooCommerce Transactional Email.

[MAILPOET-3329]
2021-01-25 11:08:00 +01:00
Jan Lysý
4390a1932d Remove phpstan errors from the rest of the code
[MAILPOET-3235]
2021-01-18 14:39:42 +01:00
Pavel Dohnal
6f0171373c Add email subjects to the response
[MAILPOET-3168]£
2021-01-08 10:37:50 +01:00
Jan Lysý
8f41628d29 Add scheduled emails subjects into segments API response
[MAILPOET-3142]
2021-01-05 13:17:46 +01:00
Rostislav Wolny
d13f63b3e2 Fix other minor type issues in libs
[MAILPOET-3926]
2020-12-07 11:36:01 +01:00