Commit Graph

21439 Commits

Author SHA1 Message Date
John Oleksowicz
8a66c83257 Add "was sent email" filter
MAILPOET-5004
2023-05-01 11:28:25 +02:00
Rodrigo Primo
87f703f22a Update NewsletterOption and NewsletterOptionField removal date
This commit updates the remove date of the deprecated models
NewsletterOption and NewsletterOptionField. When they were initially
deprecated it was missed that two Newsletter model methods still used
them.

Those two methods are deprecated in this commit as apparently they are
not used anymore in MP's codebase.

[MAILPOET-5252]
2023-04-28 17:23:03 +01:00
Rodrigo Primo
6f511c685b Remove deprecated methods from the Newslleter model
Those methods were deprecated over six months ago.

[MAILPOET-5252]
2023-04-28 17:23:03 +01:00
Rodrigo Primo
854e8a7f07 Remove models that were deprecated over six months ago
The removal date of all these models passed a couple of months ago.

[MAILPOET-5252]
2023-04-28 17:23:03 +01:00
Rodrigo Primo
5a85390655 Replace remaining calls to utf8_encode() with mb_convert_encoding()
In the previous commit, I removed all calls to the deprecated
utf8_encode() that seemed safe to remove. In this commit, I'm replacing
the calls to this function that I'm not sure if are same to remove or
not with mb_convert_encoding().

mb_convert_encoding() requires the extension mbstring to be enabled. It
should be enabled on most PHP install but not all. We are already using
mbstring functions in our code base and we provide a polyfill for PHP
installs where the extension is not enabled
(62bb75ed91/mailpoet/prefixer/composer.json (L25)).
So it should be safe to use it.

[MAILPOET-4865]
2023-04-28 10:26:03 +02:00
Rodrigo Primo
19028eee3d Stop using utf8_encode() when calling php_uname()
This was added in a37ff8d. Per the commit message, php_uname() in a
Windows server can sometimes return the string using encondings other
than ISO-8859-1 and thus utf8_encode() was added. The problem is that
utf8_encode() only converts from ISO-8859-1 to UTF-8 so it does not work
for the purpose that it was added and it was deprecated in PHP 8.2.

Removing it seems safe. If we start having problems with character
encoding in the string that we are sending to Helpscout, we can consider
other alternatives to make sure the string is always send using UTF-8.

[MAILPOET-4865]
2023-04-28 10:26:03 +02:00
Rodrigo Primo
7c4a84aaf4 Remove notices for hooks that were deprecated over six months ago
[MAILPOET-5272]
2023-04-28 06:05:29 +01:00
David Remer
62bb75ed91 Introduce keywords and dynamic titles
[PREMIUM-223]
2023-04-27 13:40:10 +02:00
David Remer
ca3487abee Introduce Automation notification email type
[PREMIUM-223]
2023-04-27 13:40:10 +02:00
David Remer
6b36eaa6d8 Fix colors of icon
[PREMIUM-223]
2023-04-27 13:40:10 +02:00
David Remer
9301b5b070 Add Notification Email Action stubs
[PREMIUM-223]
2023-04-27 13:40:10 +02:00
David Remer
0843dde765 Export StepName
[PREMIUM-223]
2023-04-27 13:40:10 +02:00
Rostislav Wolny
e62a3ee5b5 Add escaping for known shortcodes when rendered in form textarea's value
[MAILPOET-5243]
2023-04-27 10:42:34 +02:00
Jan Lysý
fb2c839fad Remove version from image url in templates
[MAILPOET-5217]
2023-04-26 11:52:16 +02:00
Jan Lysý
87352ee366 Remove version from the image url
[MAILPOET-5217]
2023-04-26 11:52:16 +02:00
Rostislav Wolny
380e6d0f0a Use Bridge API error constants instead of strings for error mapping
[MAILPOET-5103]
2023-04-26 10:57:40 +02:00
Rostislav Wolny
06ac055112 Add Bridge API constant for subscribers limit error
[MAILPOET-5103]
2023-04-26 10:57:40 +02:00
Rostislav Wolny
8ce8524ee3 Adjust conditions for displaying pending approval notice
The method was displayed even when MSS was set but key was not valid.
This may happen when a key loses the access to MSS.
[MAILPOET-5103]
2023-04-26 10:57:40 +02:00
Rostislav Wolny
3569a20efa Display MSS not active message on key activation page
[MAILPOET-5103]
2023-04-26 10:57:40 +02:00
Rostislav Wolny
32be9ef361 Display error messages for limited access on key activation page
[MAILPOET-5103]
2023-04-26 10:57:40 +02:00
Rostislav Wolny
85d112bb82 Add access_restriction for both keys to Settings store
[MAILPOET-5103]
2023-04-26 10:57:40 +02:00
Rostislav Wolny
bee18084c3 Introduce underprivileged key status also for premium key
In MAILPOET-4464 we introduced the new state "valid_underprivileged".
During implementation we introduced the state for MSS key validation,
but we forgot about the premium key.

This commit adds support for the state also for premium key validation.
When the key is underprivileged we don't display any error.

We will add specific error for underprivileged keys with specific
access restrictions in follow-up commits.

[MAILPOET-5103]
2023-04-26 10:57:40 +02:00
Rostislav Wolny
37d6d612c4 Detect and save api key access restriction reason during key check
[MAILPOET-5103]
2023-04-26 10:57:40 +02:00
Rostislav Wolny
1f287e7af0 Use common private method for checking keys in Bridge API
The two public methods for checking MSS and Premium keys were almost
exact copies.
To avoid doing the same changes in two places I decided to refactor them to
internally use a common private method.
[MAILPOET-5103]
2023-04-26 10:57:40 +02:00
Sam Najian
8501b1ba80 Hide brand styles settings when not available
[MAILPOET-5194]
2023-04-26 10:57:23 +02:00
Sam Najian
8b482136d0 Convert utils.js file to ts
[MAILPOET-5194]
2023-04-26 10:57:23 +02:00
Sam Najian
4137c12bca Define brand styles setting on window object if available
[MAILPOET-5194]
2023-04-26 10:57:23 +02:00
Sam Najian
ef7f2ebade Define method to disable theme templates settings
[MAILPOET-5194]
2023-04-26 10:57:23 +02:00
alex-mailpoet
f7212e583a Update Semgrep rules cloning
[MAILPOET-5230]
2023-04-26 10:01:51 +02:00
alex-mailpoet
1603378d7d Skip upgrader->install() as false positve
[MAILPOET-5230]
2023-04-26 10:01:51 +02:00
alex-mailpoet
930ff18785 Skip add_query_arg() finding as false positive
[MAILPOET-5230]
2023-04-26 10:01:51 +02:00
alex-mailpoet
f12bb8e680 Run Semgrep check on build
[MAILPOET-5230]
2023-04-26 10:01:51 +02:00
David Remer
b91d96deab Fix doctype to reflect the array key can be an integer
[MAILPOET-5267]
2023-04-26 09:56:08 +02:00
David Remer
6a6d158785 Cast steps array key to string
[MAILPOET-5267]
2023-04-26 09:56:08 +02:00
Rodrigo Primo
d6545a01f6 Update Docker image for oldest acceptance tests to use WP 6.0
The new image uses PHP 7.4 instead of PHP 7.3 as there is not a WP base
image available for 6.0 using PHP 7.3.

[MAILPOET-5075]
2023-04-25 14:24:11 -03:00
Rodrigo Primo
4e3f540bc1 Use WP 6.2 when running the acceptance tests
Just bumping the WP version used in the acceptance tests to the latest
version.

[MAILPOET-5075]
2023-04-25 14:24:11 -03:00
Brezo Cordero
aac6eff525 Release 4.13.0 2023-04-25 09:19:01 -05:00
Jan Lysý
25a2b8eceb Improve closing settings panel
Because closing panel causes flakiness we can try it multiple times.
[MAILPOET-5240]
2023-04-24 15:22:22 -03:00
Rostislav Wolny
9240603063 Escape checkbox label on render
[MAILPOET-5241]
2023-04-24 13:26:31 +02:00
Rostislav Wolny
6c2cda36b0 Run custom field data through sanitizer when saving via API
[MAILPOET-5241]
2023-04-24 13:26:31 +02:00
Jan Jakes
bc950d0616 Remove no longer needed index.php file
[MAILPOET-5236]
2023-04-24 12:45:17 +02:00
Jan Jakes
bdee356bb8 Check for existence of both index.php and Index.php
[MAILPOET-5236]
2023-04-24 12:45:17 +02:00
Jan Jakes
7b07667e76 Make sure generated empty index files contain PHP open tag
This error was detected by a rule "Internal.NoCodeFound" with the following message:

No PHP code was found in this file and short open tags are not allowed by this install of PHP.
This file may be using short open tags but PHP does not allow them.

[MAILPOET-5236]
2023-04-24 12:45:17 +02:00
Jan Jakes
8a228ed854 Add feature flag for displaying trigger filters
[MAILPOET-5257]
2023-04-24 10:42:28 +02:00
Jan Jakes
f75620a7c1 Add IDs for filter groups and filter definitions
[MAILPOET-5257]
2023-04-24 10:42:28 +02:00
Jan Jakes
34ca96d007 Introduce filters data type and filter groups to enable saving and/or filter combinations
[MAILPOET-5257]
2023-04-24 10:42:28 +02:00
Jan Jakes
a6fcc60de3 Add "of" preposition to matches any/all/none
[MAILPOET-5257]
2023-04-24 10:42:28 +02:00
Jan Jakes
761c28ef01 Add migration from "transactional" email type to "automation_transactional"
We also need to extend the column max. size.

[MAILPOET-5258]
2023-04-24 09:54:08 +03:00
Jan Jakes
69f21814e3 Rename "transactional" email type to "automation_transactional"
[MAILPOET-5258]
2023-04-24 09:54:08 +03:00
dependabot[bot]
05d48811eb Bump guzzlehttp/psr7 from 1.9.0 to 1.9.1 in /mailpoet
Bumps [guzzlehttp/psr7](https://github.com/guzzle/psr7) from 1.9.0 to 1.9.1.
- [Release notes](https://github.com/guzzle/psr7/releases)
- [Changelog](https://github.com/guzzle/psr7/blob/1.9.1/CHANGELOG.md)
- [Commits](https://github.com/guzzle/psr7/compare/1.9.0...1.9.1)

---
updated-dependencies:
- dependency-name: guzzlehttp/psr7
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-21 15:38:35 +02:00