Compare commits

...

1936 Commits

Author SHA1 Message Date
7e858e212b Release 4.14.0 2023-05-01 15:19:48 +02:00
f3cd33b3c9 Return same data object on empty or null subscriber
If subscriber is empty we want to return the same token as if it is null.

[MAILPOET-5248]
2023-05-01 13:15:04 +02:00
01320f4511 Fix tests checking the same values twice
[MAILPOET-5187]
2023-05-01 12:42:35 +02:00
6e32f57275 Add missing value to subscriber status field
[MAILPOET-5187]
2023-05-01 12:42:35 +02:00
07266e4833 Fix error when filter for an unknown field is defined
[MAILPOET-4624]
2023-05-01 12:42:35 +02:00
2bded12e54 Allow rendering no filter value
[MAILPOET-4624]
2023-05-01 12:42:35 +02:00
d4a77ba057 Render filter values in filters list
[MAILPOET-4624]
[MAILPOET-5001]
[MAILPOET-5187]
2023-05-01 12:42:35 +02:00
554d195219 Expose number control
[MAILPOET-4624]
2023-05-01 12:42:35 +02:00
2da3e08c09 Implement enum filter
[MAILPOET-5187]
2023-05-01 12:42:35 +02:00
de0199421c Implement integer filter
[MAILPOET-4624]
2023-05-01 12:42:35 +02:00
94e3c0e391 Implement number filter
[MAILPOET-4624]
2023-05-01 12:42:35 +02:00
3f923ffce9 Implement boolean filter
[MAILPOET-5001]
2023-05-01 12:42:35 +02:00
ee0c3f4bbf Add one field for each new filter type (number, integer, boolean, string)
[MAILPOET-4624]
[MAILPOET-5001]
[MAILPOET-5187]
2023-05-01 12:42:35 +02:00
0cd14002ec Fix filter type and improve values in enum array filter test
[MAILPOET-5187]
2023-05-01 12:42:35 +02:00
8a66c83257 Add "was sent email" filter
MAILPOET-5004
2023-05-01 11:28:25 +02:00
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
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
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
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
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
7c4a84aaf4 Remove notices for hooks that were deprecated over six months ago
[MAILPOET-5272]
2023-04-28 06:05:29 +01:00
62bb75ed91 Introduce keywords and dynamic titles
[PREMIUM-223]
2023-04-27 13:40:10 +02:00
ca3487abee Introduce Automation notification email type
[PREMIUM-223]
2023-04-27 13:40:10 +02:00
6b36eaa6d8 Fix colors of icon
[PREMIUM-223]
2023-04-27 13:40:10 +02:00
9301b5b070 Add Notification Email Action stubs
[PREMIUM-223]
2023-04-27 13:40:10 +02:00
0843dde765 Export StepName
[PREMIUM-223]
2023-04-27 13:40:10 +02:00
e62a3ee5b5 Add escaping for known shortcodes when rendered in form textarea's value
[MAILPOET-5243]
2023-04-27 10:42:34 +02:00
fb2c839fad Remove version from image url in templates
[MAILPOET-5217]
2023-04-26 11:52:16 +02:00
87352ee366 Remove version from the image url
[MAILPOET-5217]
2023-04-26 11:52:16 +02:00
380e6d0f0a Use Bridge API error constants instead of strings for error mapping
[MAILPOET-5103]
2023-04-26 10:57:40 +02:00
06ac055112 Add Bridge API constant for subscribers limit error
[MAILPOET-5103]
2023-04-26 10:57:40 +02:00
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
3569a20efa Display MSS not active message on key activation page
[MAILPOET-5103]
2023-04-26 10:57:40 +02:00
32be9ef361 Display error messages for limited access on key activation page
[MAILPOET-5103]
2023-04-26 10:57:40 +02:00
85d112bb82 Add access_restriction for both keys to Settings store
[MAILPOET-5103]
2023-04-26 10:57:40 +02:00
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
37d6d612c4 Detect and save api key access restriction reason during key check
[MAILPOET-5103]
2023-04-26 10:57:40 +02:00
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
8501b1ba80 Hide brand styles settings when not available
[MAILPOET-5194]
2023-04-26 10:57:23 +02:00
8b482136d0 Convert utils.js file to ts
[MAILPOET-5194]
2023-04-26 10:57:23 +02:00
4137c12bca Define brand styles setting on window object if available
[MAILPOET-5194]
2023-04-26 10:57:23 +02:00
ef7f2ebade Define method to disable theme templates settings
[MAILPOET-5194]
2023-04-26 10:57:23 +02:00
f7212e583a Update Semgrep rules cloning
[MAILPOET-5230]
2023-04-26 10:01:51 +02:00
1603378d7d Skip upgrader->install() as false positve
[MAILPOET-5230]
2023-04-26 10:01:51 +02:00
930ff18785 Skip add_query_arg() finding as false positive
[MAILPOET-5230]
2023-04-26 10:01:51 +02:00
f12bb8e680 Run Semgrep check on build
[MAILPOET-5230]
2023-04-26 10:01:51 +02:00
b91d96deab Fix doctype to reflect the array key can be an integer
[MAILPOET-5267]
2023-04-26 09:56:08 +02:00
6a6d158785 Cast steps array key to string
[MAILPOET-5267]
2023-04-26 09:56:08 +02:00
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
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
aac6eff525 Release 4.13.0 2023-04-25 09:19:01 -05:00
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
9240603063 Escape checkbox label on render
[MAILPOET-5241]
2023-04-24 13:26:31 +02:00
6c2cda36b0 Run custom field data through sanitizer when saving via API
[MAILPOET-5241]
2023-04-24 13:26:31 +02:00
bc950d0616 Remove no longer needed index.php file
[MAILPOET-5236]
2023-04-24 12:45:17 +02:00
bdee356bb8 Check for existence of both index.php and Index.php
[MAILPOET-5236]
2023-04-24 12:45:17 +02:00
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
8a228ed854 Add feature flag for displaying trigger filters
[MAILPOET-5257]
2023-04-24 10:42:28 +02:00
f75620a7c1 Add IDs for filter groups and filter definitions
[MAILPOET-5257]
2023-04-24 10:42:28 +02:00
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
a6fcc60de3 Add "of" preposition to matches any/all/none
[MAILPOET-5257]
2023-04-24 10:42:28 +02:00
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
69f21814e3 Rename "transactional" email type to "automation_transactional"
[MAILPOET-5258]
2023-04-24 09:54:08 +03:00
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
ddf323aa3b Release 4.12.2 2023-04-21 13:01:54 +02:00
2b83c8c69f Fix previously sanitized link
[MAILPOET-5254]
2023-04-21 11:14:25 +02:00
f6b752e807 Revert email links sanitization on save
[MAILPOET-5254]
2023-04-21 11:14:25 +02:00
d00efbeb54 Fix filter handler may change query builder as a side effect
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
51c22c7044 Add integration test for trigger filters
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
963dd083b6 Add subscriber segments field, comment out other fields for now
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
f6a59647d5 Implement filter args validation
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
0bf7e5e77f Add a fix for PHPStan issue causing polyfills not being loaded
We can remove this fix when the issue is resolved:
https://github.com/phpstan/phpstan/issues/7732

[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
ffaa140289 Implement finding all static and dynamic segments for a subscriber
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
0157feb508 Remove no longer used exception
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
abe44ca9f8 Implement filter handler to apply filters on field values during automation run
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
9d99872ef7 Implement field value loading logic
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
7d6cfd911e Pass subject payload to field factories
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
7f9faf1d99 Use automation WP helpers
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
ae828b9ac4 Do not load all possible subjects eagerly
With subject transformers the amount of possible subjects will grow,
and preloading even those that won't be used may result in performance
issues, and unnecessary errors (e.g., caused by 3rd party transformers).

[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
54f5addca9 Extract subject loading before automation processing loop
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
70dbfc28b7 Early return when no active automation matches given trigger
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
d99a7bca90 Render filter conditions
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
9f856b5b01 Add filter value rendering
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
925e8722e7 Add filter delete placeholder
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
8a3a068e6a Add rendering of the list of existing filters
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
447b0e496c Add filters to UI registry
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
4ff9306826 Add filter management into automation registry
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
56b551dc16 Implement enum array filter
[MAILPOET-4946]
[MAILPOET-5002]
2023-04-20 16:32:32 +02:00
370f3082de Implement string filter
[MAILPOET-4946]
[MAILPOET-4419]
2023-04-20 16:32:32 +02:00
52be5ca3f9 Add interface for filter definition
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
eaa1a4aa69 Save automation filters to the database
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
014db1e695 Add step filters schema
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
3ed038479a Add subject data to automation editor registry
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
0bf9e75dd0 Automatically register fields exposed from subjects
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
209ede594e Add fields management to automation registry
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
97e40955ab Add fields to subject interface
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
3da51a0cf9 Add filters section with premium upsell to triggers
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
3af9701683 Expose FormTokenField from @wordpress/components
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
ad319393b7 Expose Button from @wordpress/components
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
28c4f5e3d0 Fix missing key prop
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
6f0307be95 Flush database changes before invoking "mailpoet_segment_subscribed" hook
This is to ensure the hook consumers can read up-to-date data from the database.

[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
c3656829a7 Remove the code coverage command documentation from the README.md file
This command doesn't exist anymore

[MAILPOET-2440]
2023-04-20 16:21:34 +02:00
a3cf1daeae Remove code coverage code as it is not used anymore
[MAILPOET-2440]
2023-04-20 16:21:34 +02:00
8028bd3e95 Use discouraged function directly
We need to add a warning so that we know for sure
that this piece of risky code gets reviewed by a human and consciously ignore the warning

[MAILPOET-5245]
2023-04-20 12:00:29 +02:00
08c320423b Use a discouraged function in the tests directly
[MAILPOET-5245]
2023-04-20 12:00:29 +02:00
8b7b933d1e Release 4.12.1 2023-04-19 12:42:28 -05:00
ec987cbc4e Fix errors in 3rd party lib
MAILPOET-5239
2023-04-19 14:47:38 +01:00
0fe75d98f9 Add migration fixing newsletter option fields
[MAILPOET-5244]
2023-04-19 15:32:28 +02:00
4bcf413dbe Fix minute scheduling for post notifications
We recently added minute scheduling in UI, but we forgot to update PostNotificationScheduler.
It caused calculating float number for hours and PN were not scheduled.
[MAILPOET-5244]
2023-04-19 15:32:28 +02:00
f5a2088000 Add test cases for minute scheduling
[MAILPOET-5244]
2023-04-19 15:32:28 +02:00
b35b772eb1 Release 4.12.0 2023-04-18 13:01:06 -05:00
769a11048e Remove PHPStan ignored error as it is not happening anymore
[MAILPOET-5232]
2023-04-17 14:33:51 -03:00
aa5b052e66 Handle sanitization as early as possible per best practices
Per WP security best practices, sanitization should be handled as early
as possible. So this commit move updates the calls to sanitize the
segment name and description to the part of the code where the user
input is first processed, instead of when the data is saved to the
database.

[MAILPOET-5232]
2023-04-17 14:33:51 -03:00
db23bffee1 Escape the option name when displaying items in a list in a form
This should prevent an XSS vector both in the segments list in the page
to edit a subscriber and in the segments lists in the page to send a
newsletter.

[MAILPOET-5232]
2023-04-17 14:33:51 -03:00
d52dfa215c Always escape segment name and description in the segment list page
Please note that this change might impact some users as before we were
displaying HTML tags in the segment description but now the < will be
convert to an HTML entity.

[MAILPOET-5232]
2023-04-17 14:33:51 -03:00
119dcbd5b5 Sanitize name and description when creating a segment
This commits adds the sanitization right before the data is added to the
database (\MailPoet\Segments\SegmentsRepository::createOrUpdate()) and
removes the sanitization from
\MailPoet\Segments\DynamicSegments\SegmentSaveController::save() to
avoid sanitizing twice. save() calls createOrUpdate().

Before this commit, we were sanitizing the name and description of
dynamic segments but not regular segments.

[MAILPOET-5232]
2023-04-17 14:33:51 -03:00
1565b71bb1 Change 'score' label to 'engagement score'
MAILPOET-4995
2023-04-17 14:42:09 +02:00
fa59c2c184 Sanitize socialIcon and image links in emails on save
[MAILPOET-5235]
2023-04-17 14:17:49 +02:00
79599ee6da Escape link for social icon and images in email editor
[MAILPOET-5235]
2023-04-17 14:17:49 +02:00
6e16bca122 Update Handlebars helper to check also data and vbscript
[MAILPOET-5235]
2023-04-17 14:17:49 +02:00
dccd729c2f Sanitize values in Button block template
[MAILPOET-5235]
2023-04-17 14:17:49 +02:00
f54e18ca44 Escape values in Button block template
[MAILPOET-5235]
2023-04-17 14:17:49 +02:00
b3e836548c Create newsletter in test
[MAILPOET-4934]
2023-04-17 13:59:39 +02:00
e5d04a011f Make keywords translateable
[MAILPOET-4999]
2023-04-17 13:59:39 +02:00
d68fdc76bf Render WooCommerce integration in UI
[MAILPOET-4999]
2023-04-17 13:59:39 +02:00
7380d4859b Render newsletter editor correctly for transactional emails
[MAILPOET-4999]
2023-04-17 13:59:39 +02:00
47fed85953 Test SendingQueue sends transactional emails as expected
[MAILPOET-4999]
2023-04-17 13:59:39 +02:00
9afe052b2a Test transactional emails get scheduled
[MAILPOET-4999]
2023-04-17 13:59:39 +02:00
db3bbd83aa Test the transactional type is set correctly
[MAILPOET-4999]
2023-04-17 13:59:39 +02:00
430c9b72f7 Exclude emails of wrong type
[MAILPOET-4999]
2023-04-17 13:59:39 +02:00
0ce8fce161 Send transactional emails to all not-bounced subscribers
[MAILPOET-4999]
2023-04-17 13:59:39 +02:00
19c6f777fc Schedule transactional emails to all subscribers who are not bounced
[MAILPOET-4999]
2023-04-17 13:59:39 +02:00
0a8bcaf484 Do not allow to send emails to bounced subscribers
[MAILPOET-4999]
2023-04-17 13:59:39 +02:00
343b91a980 Remove type specification 2023-04-17 13:59:39 +02:00
59bbe31433 Allow transactional emails
[MAILPOET-4999]
2023-04-17 13:59:39 +02:00
46f888a30b Let transactional emails pass
[MAILPOET-4999]
2023-04-17 13:59:39 +02:00
ac65c138ee Set transactional email type when email is transactional
[MAILPOET-4999]
2023-04-17 13:59:39 +02:00
18baff3888 Add type transactional
[MAILPOET-4999]
2023-04-17 13:59:39 +02:00
b303111d3d Add Automation to AUTOMATION_STEP_BEFORE_SAVE action
[MAILPOET-4999]
2023-04-17 13:59:39 +02:00
f27b6a26bb Align send email step title icon
[MAILPOET-4999]
2023-04-17 13:59:39 +02:00
3e4e323131 Render title in Inserter and error view
[MAILPOET-4999]
2023-04-17 13:59:39 +02:00
12b769abe1 Add beacon ID
[MAILPOET-4999]
2023-04-17 13:59:39 +02:00
0f1929625f Remove 'Feedback' beacon
[MAILPOET-4999]
2023-04-17 13:59:39 +02:00
2ceb002d96 Do render title icon only in automation view
[MAILPOET-4999]
2023-04-17 13:59:39 +02:00
982f6b9177 Introduce StepRenderContext
[MAILPOET-4999]
2023-04-17 13:59:39 +02:00
82d7f77f9c Render send email title and description
[MAILPOET-4999]
2023-04-17 13:59:39 +02:00
f44ae7ac8f Make title and description dynamic, introduce keywords
[MAILPOET-4999]
2023-04-17 13:59:39 +02:00
4f42fa86a3 Use proper escaping function in option inner html
[MAILPOET-5233]
2023-04-17 11:51:52 +02:00
94eeae5626 Escape values in Select block render
[MAILPOET-5233]
2023-04-17 11:51:52 +02:00
d549ae713a Update texts in subscriber limit notice
[MAILPOET-5203]
2023-04-17 08:44:38 +02:00
fa5cb8aaf9 Bump the Woo version used in the acceptance_oldest CircleCI job
Bumping from 6.8.0 to 7.3.0 as this is the oldest version that we still
support.

[MAILPOET-5225]
2023-04-14 09:41:37 +02:00
ac8e2ac927 Download the latest Woo version by default for CircleCI jobs
Let's try to always download the laest version of Woo by default for the
CircleCI jobs. This way we have one less thing to update when a new
version of Woo is released and in theory MailPoet should always work
with the latest Woo version anyway.

[MAILPOET-5225]
2023-04-14 09:41:37 +02:00
479499ccb3 Remove no-longer-used variable
MAILPOET-5220
2023-04-13 18:19:59 +02:00
0c8c61cede Extract WooCommerce fields into separate functions
MAILPOET-5220
2023-04-13 18:19:59 +02:00
d1abde13f8 Don't validate single order value as date field
MAILPOET-5220
2023-04-13 18:19:59 +02:00
3681852041 Better naming
MAILPOET-5220
2023-04-13 18:19:59 +02:00
d3debdd29a Prevent error when switching between filter types
MAILPOET-5220
2023-04-13 18:19:59 +02:00
8700178f01 Remove debug code
MAILPOET-5083
2023-04-13 17:56:13 +02:00
5e9b83bf2d Add required cleanup
MAILPOET-5083
2023-04-13 17:56:13 +02:00
aaa08d5ab6 Add missing group
MAILPOET-5083
2023-04-13 17:56:13 +02:00
cf7cfe40f8 Remove unused imports
MAILPOET-5083
2023-04-13 17:56:13 +02:00
6b2faeeecb Remove unnecessary cleanup
MAILPOET-5083
2023-04-13 17:56:13 +02:00
f3f7d4dc61 Remove redundant tests
MAILPOET-5083
2023-04-13 17:56:13 +02:00
4576dd289f Add woo filter helper tests for order status
MAILPOET-5083
2023-04-13 17:56:13 +02:00
096ab74ee3 Use helper for creating customers
MAILPOET-5145
2023-04-13 17:56:13 +02:00
40fc3882f3 Use correct statuses for category filter
MAILPOET-5083
2023-04-13 17:56:13 +02:00
483acb0040 Use correct statuses for single order value
MAILPOET-5083
2023-04-13 17:56:13 +02:00
30c8ce0839 Use correct statuses for total spent
MAILPOET-5083
2023-04-13 17:56:13 +02:00
2caa535098 Use correct statuses for product filter
MAILPOET-5083
2023-04-13 17:56:13 +02:00
aa7bd6eb67 Use correct statuses for number of orders filter
MAILPOET-5083
2023-04-13 17:56:13 +02:00
192bdce421 Refactor tests to use helper
MAILPOET-5083
2023-04-13 17:56:13 +02:00
a2d6da8c61 Add test helper for checking emails
MAILPOET-5083
2023-04-13 17:56:13 +02:00
a9d89ff514 Use onChange instead of onClick for check boxes
[MAILPOET-5193]
2023-04-12 11:20:39 +02:00
84f263db2e Add missing translation domain
[MAILPOET-5193]
2023-04-12 11:20:39 +02:00
c0fb4c44ff Fix failing js tests
The test suits need window.mailpoet_feature_flags to be defined
in case the feature flags are checked in the code

[MAILPOET-5193]
2023-04-12 11:20:39 +02:00
b276202e45 Add brand/theme colors and typography to boxes
[MAILPOET-5193]
2023-04-12 11:20:39 +02:00
52357eb586 Adjust box bg and border on select
[MAILPOET-5193]
2023-04-12 11:20:39 +02:00
931c6ca198 Convert sidebar.js to tsx
[MAILPOET-5193]
2023-04-12 11:20:39 +02:00
152b9af871 Add the boxes and the check boxes
[MAILPOET-5193]
2023-04-12 11:20:39 +02:00
325dc9e9f6 Remove fix for lodash/underscore conflict (MediaManagerBehavior)
[MAILPOET-5127]
2023-04-12 08:37:16 +02:00
5d1ae1f9d0 Force sync with customers lookup table after a change in Woo core
A unintentional side-effect in Woo core < 7.6 synched the customer
lookup table immediately after the creation of an order. This
unintentional behavior was removed in Woo 7.6 and now we need to call
\Automattic\WooCommerce\Admin\API\Reports\Customers\DataStore::sync_order_customer()
explicitly for Woo to add to the customer lookup table.

Without this change, a few tests in WooCommerceCountryTest were failing
when running with Woo 7.6. As far as I could check this change does not
affect anything else in MP other than the tests.

[MAILPOET-5148]
2023-04-11 11:30:09 -05:00
8728229659 Decrease nightly tests max duration to 12m and update email in test
[MAILPOET-5208]
2023-04-11 18:09:21 +02:00
3077723a27 Release 4.11.1 2023-04-11 11:35:38 -03:00
3848c3e653 Add missing translations for paused emails
[MAILPOET-5201]
2023-04-10 13:03:18 +02:00
63be8969f3 Improve strings based on translators' feedback
[MAILPOET-5201]
2023-04-10 13:03:18 +02:00
428f52fdb6 Update tests not included in original PR
MAILPOET-5145
2023-04-07 20:17:05 -05:00
6c03702fbd Fix test failure that was occurring for multisite
A previous test must have sent a confirmation email to a subscriber with
 the same ID.

 This didn't seem worth adding to the cleanup extension since it was
 only causing a single failure.

MAILPOET-5145
2023-04-07 20:17:05 -05:00
4b35b24f6a More accurate name for cleanup property
MAILPOET-5145
2023-04-07 12:11:12 -05:00
b296e40077 Extract Carbon datetime reset to test bootstrap
MAILPOET-5145
2023-04-07 12:11:12 -05:00
70e6447e28 Extract WPFunctions reset to test bootstrap
MAILPOET-5145
2023-04-07 12:11:12 -05:00
81274b1691 Replace hardcoded custom field ID with the actual one
MAILPOET-5145
2023-04-07 12:11:12 -05:00
c1babe49db Remove more no longer necessary test cleanups
MAILPOET-5145
2023-04-07 12:11:12 -05:00
90bbca0987 Clean all mailpoet tables by prefix
MAILPOET-5145
2023-04-07 12:11:12 -05:00
18b953e68c Add tmpfs mount for faster MySQLing
MAILPOET-5145
2023-04-07 12:11:12 -05:00
e7f766aedf Remove empty _afters
MAILPOET-5145
2023-04-07 12:11:12 -05:00
f90e869402 Clean up after automations too
MAILPOET-5145
2023-04-07 12:11:12 -05:00
6a2da4645b Remove apparently unnecessary DB query
Removing this code didn't result in any tests failing, so I can only
assume it isn't required for anything.

We were occasionally seeing primary key constraint violations when
attempting to execute this query.

MAILPOET-5145
2023-04-07 12:11:12 -05:00
8bb917cd09 Prevent high order IDs from breaking tests
These tests were starting to fail if previous tests had created more
orders than the batch size

MAILPOET-5145
2023-04-07 12:11:12 -05:00
9455eebb60 Add back scheduled task cleanup
MAILPOET-5145
2023-04-07 12:11:12 -05:00
d112d4088f Fix issue with IDs
MAILPOET-5145
2023-04-07 12:11:12 -05:00
376dca1098 Remove unnecessary truncating
MAILPOET-5145
2023-04-07 12:11:12 -05:00
cf67ad2a83 Add missing parent::_after calls
MAILPOET-5145
2023-04-07 12:11:12 -05:00
c848c62ee9 Remove unnecessary cleanup code
MAILPOET-5145
2023-04-07 12:11:12 -05:00
cd0b795ac8 Extract customer creation/cleanup
This also ensures that cleanup always runs after all integration tests

MAILPOET-5145
2023-04-07 12:11:12 -05:00
f9d6e65ece Ensure personal data exporter includes all custom fields
The test testExportSubscriberWithCustomField was only passing before
because we were truncating tables in between tests, so the custom field
id ended up matching the subscriber custom field id coincidentally.

MAILPOET-5145
MAILPOET-5185
2023-04-07 12:11:12 -05:00
2292ab09a8 Don't assume auto increment of 1
MAILPOET-5145
2023-04-07 12:11:12 -05:00
4c3e7e62d4 Split up problematic test
MAILPOET-5145
2023-04-07 12:11:12 -05:00
33f744e9be Simplify problematic test
MAILPOET-5145
2023-04-07 12:11:12 -05:00
c75bc388c9 Remove unnecessary cleanup code
MAILPOET-5145
2023-04-07 12:11:12 -05:00
57eb438eb8 Don't assume auto increment of 1
MAILPOET-5145
2023-04-07 12:11:12 -05:00
ae442e191c Add database cleaner for integration tests
MAILPOET-5145
2023-04-07 12:11:12 -05:00
520e7166cf Don't stop on first failure
MAILPOET-5145
2023-04-07 12:11:12 -05:00
c25567ae64 Remove name parameter from circleci config
[MAILPOET-5196]
2023-04-07 15:45:50 +02:00
c8c88a8704 If there is no k6 cloud token set in env dont stream to cloud
[MAILPOET-5196]
2023-04-07 15:45:50 +02:00
f994d1b232 Streamline test results output to k6 cloud
[MAILPOET-5196]
2023-04-07 15:45:50 +02:00
d6991eaa17 Update env sample file 2023-04-05 11:32:08 +02:00
0e15b459c0 Reorder tests 2023-04-05 11:32:08 +02:00
3212da8deb Set scenario thresholds to pass in 95% times 2023-04-05 11:32:08 +02:00
57dbb2fdb4 Set scenario thresholds to be on a safe side 2023-04-05 11:32:08 +02:00
6acebd9145 Update newsletter stats test 2023-04-05 11:32:08 +02:00
db1416014e Update tests 2023-04-05 11:32:08 +02:00
c2ad02514c Add await for all pages 2023-04-05 11:32:08 +02:00
d6c2fa5f96 Add taking screenshots across all tests 2023-04-05 11:32:08 +02:00
e63ead696e Update taking screenshots 2023-04-05 11:32:08 +02:00
f1cb67bd3f Revert changes 2023-04-05 11:32:08 +02:00
c94aad885c Try integration 2023-04-05 11:32:08 +02:00
06e60730d3 Integrate k6 cloud and circleci 2023-04-05 11:32:08 +02:00
fb6f86543c Revert it back 2023-04-05 11:32:08 +02:00
6594975d92 Testing integration 2023-04-05 11:32:08 +02:00
423d445d8f Add k6 orb 2023-04-05 11:32:08 +02:00
24f6ebaf0c Again move k6 cloud true 2023-04-05 11:32:08 +02:00
72d0af6951 Move cloud true to another place 2023-04-05 11:32:08 +02:00
0b1d0b4960 Integrate k6 cloud and CircleCI 2023-04-05 11:32:08 +02:00
51ee9637d9 Remove caching in CI 2023-04-05 11:32:08 +02:00
34b7bf5cad Update expected in newsletter listing test 2023-04-05 11:32:08 +02:00
902e275c47 Update config yml 2023-04-05 11:32:08 +02:00
774266ee8d Include taking screenshots 2023-04-05 11:32:08 +02:00
b488ae71d9 Update onboarding wizard test 2023-04-05 11:32:08 +02:00
97848a42f5 Update RoboFile with PW 2023-04-05 11:32:08 +02:00
82d6c51365 Update code to align with eslint 2023-04-05 11:32:08 +02:00
b1704a268c Switch back to per-vu-iterations 2023-04-05 11:32:08 +02:00
99f6d7445a Refactor newsletterStatistics test and add onboardingWizzard 2023-04-05 11:32:08 +02:00
59cb38a986 Remove duplicated code 2023-04-05 11:32:08 +02:00
f0b7c42275 Update per vu to shared iterations and fix auth method
[MAILPOET-4950]
2023-04-05 11:32:08 +02:00
eca4e2104a Cache mysql volume for performance tests
[MAILPOET-4950]
2023-04-05 11:32:08 +02:00
2db1157c63 Increase performance tests mysql start timeouts for data import
[MAILPOET-4950]
2023-04-05 11:32:08 +02:00
6141e4a57a Download and import data for performance tests
[MAILPOET-4950]
2023-04-05 11:32:08 +02:00
7680e879d0 Add brand templates feature flag to JS
[MAILPOET-5192]
2023-04-05 11:19:20 +02:00
22aa07093c Add brand templates feature flag
[MAILPOET-5192]
2023-04-05 11:19:20 +02:00
b47fc02ca4 Use underprivileged key for stats reporting also when saving settings
[MAILPOET-5165]
2023-04-04 18:45:41 +02:00
910eb812c0 Improve variable name in WordPress cron trigger check
[MAILPOET-5165]
2023-04-04 18:45:41 +02:00
cbd5c443f2 Ensure that subscriber stats are sent even for valid underprivileged keys
[MAILPOET-5165]
2023-04-04 18:45:41 +02:00
4af1b970e3 Release 4.11.0 2023-04-04 13:57:23 +02:00
66259fc9b6 Reintroduce AWS SES sending error test with actual SES response
[MAILPOET-5190]
2023-04-04 06:47:26 +02:00
72c18782cc Simplify and move test to more appropriate spot
MAILPOET-5190
2023-04-04 06:47:26 +02:00
13e79082a0 Restore subject and preview text tooltips
We used to display a tooltip next to the fields subject and preview text
in the email editor. Those tooltips were accidentally in 4367f44. The
referenced commit changed the code and tried to get the elements used to
display the tooltip before they were present in the browser.

This commit fixes this problem by making sure that the code tries to get
those elements after StartApp._appView.showChildView() runs and the
elements are present.

[MAILPOET-5151]
2023-04-03 14:31:14 +02:00
332408f4f4 Make sure newsletter segment entities are deleted when list is deleted
This commit adds code to delete corresponding newsletter segment
entities when a given list is deleted. This is necessary to fix an error
when duplicating a newsletter that was sent with a list that was
deleted.

Without this change users see the following SQL error:

```
An exception occurred while executing ‘UPDATE wp_mailpoet_newsletter_segment SET segment_id = ?, updated_at = ? WHERE id = ?’ with params [null, “2023-03-23 09:07:52”, 66]: SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘segment_id’ cannot be null
```

[MAILPOET-5153]
2023-04-03 14:15:17 +02:00
feba707c76 Use dependency injection (DI) for process shortcodes
MAILPOET-5110
2023-04-03 13:36:04 +02:00
c75dc63cc5 Process Shortcodes in WooCommerce custom template
MAILPOET-5110
2023-04-03 13:36:04 +02:00
685af267cb Use constant, improve test and naming
[MAILPOET-5131]
2023-04-03 12:57:31 +02:00
fb93c73a34 Add premium key verification
[MAILPOET-5131]
2023-04-03 12:57:31 +02:00
c0eed5b919 Integration tests for provisioning
[MAILPOET-5131]
2023-04-03 12:57:31 +02:00
fc8837e03c Filter for license provisioning
This commit adds a filter that will provision the API key. It only runs on WP.com sites with plugins.

[MAILPOET-5131]
2023-04-03 12:57:31 +02:00
397232e932 Set status of scheduled_task to invalid if it has not subs
[MAILPOET-5134]
2023-04-03 11:53:49 +02:00
cb786ee57f Write acceptance test to replicate the bug
[MAILPOET-5134]
2023-04-03 11:53:49 +02:00
47bbba4898 Remove mailpoet/.nvmrc
This file is not needed anymore, as in
7c373a85ba we added a .nvmrc file to the
root directory of this repository.

[MAILPOET-5186]
2023-04-03 11:02:42 +02:00
1d87c4377e Ensure purchase date fields are properly validated
MAILPOET-4986
2023-04-03 10:20:02 +02:00
4eaaa51bce Fix type issue
MAILPOET-4986
2023-04-03 10:20:02 +02:00
0c109ea34c Fix rebase issue
MAILPOET-4986
2023-04-03 10:20:02 +02:00
df3b790c0b Prettier fix
MAILPOET-4986
2023-04-03 10:20:02 +02:00
03da98e5df Avoid simple text replacements in SQL if possible
MAILPOET-4986
2023-04-03 10:20:02 +02:00
1cab4a944a Use standard joins where possible
MAILPOET-4986
2023-04-03 10:20:02 +02:00
509a79fd1a Proper method naming
MAILPOET-4986
2023-04-03 10:20:02 +02:00
68902a206d Extract more to helpers
MAILPOET-4986
2023-04-03 10:20:02 +02:00
26ec430942 Refactor to use DI instead of inheritance
MAILPOET-4986
2023-04-03 10:20:02 +02:00
fa43495d81 Minor refactoring
MAILPOET-4986
2023-04-03 10:20:02 +02:00
c747b71829 Simplify subquery
MAILPOET-4986
2023-04-03 10:20:02 +02:00
d505bffcfd Refactor to use shared date functionality
MAILPOET-4986
2023-04-03 10:20:02 +02:00
caba21b8af Fix relative date calculation
MAILPOET-4986
2023-04-03 10:20:02 +02:00
d52113d104 Extract shared date filter functionality
MAILPOET-4986
2023-04-03 10:20:02 +02:00
37226202bc Implement purchase date dynamic filter
MAILPOET-4986
2023-04-03 10:20:02 +02:00
398f8ffddd Accomadate the translations placement change in WP6.2
- Compatible WPCLI is installed
- Translation folder is make writable

[MAILPOET-5073]
2023-03-30 15:58:49 +02:00
8ea409cb22 Verify language switch was successful
[MAILPOET-5073]
2023-03-30 15:58:49 +02:00
8c13b726f3 Be more specific whens electing Checkout block
[MAILPOET-5073]
2023-03-30 15:58:49 +02:00
be41b1e896 Update closeDialog method to use the new aria-label
In new version, arial-label has changed from Close dialog
to Close

[MAILPOET-5073]
2023-03-30 15:58:49 +02:00
9c99fe733b Refactor k6 to use chai.js
[MAILPOET-5156
2023-03-30 14:43:31 +02:00
7b90dff4b6 First attempt to try and make checks failing 2023-03-30 14:43:31 +02:00
5c2b150d63 Hide WooCommerce integration until transactional emails are ready
[MAILPOET-4935]
2023-03-30 13:17:30 +02:00
a3ebd0695b Introduce Order to Segment transformer
[MAILPOET-4935]
2023-03-30 12:21:25 +02:00
9738bd3ecd Introduce general step error
[MAILPOET-4935]
2023-03-30 12:21:25 +02:00
a74c5993a0 Prevent error when no field is specified
[MAILPOET-4935]
2023-03-30 12:21:25 +02:00
8ba694e30d Use plural for subject transformers in test
[MAILPOET-4935]
2023-03-30 12:21:25 +02:00
328b5b1475 Remove private getSubjectKeysForSingleKey method
[MAILPOET-4935]
2023-03-30 12:21:25 +02:00
e2777aebc3 Use plural for array of subject transformers
[MAILPOET-4935]
2023-03-30 12:21:25 +02:00
19b5abc171 Use array_keys $all to get the keys
[MAILPOET-4935]
2023-03-30 12:21:25 +02:00
d6760cb113 Use array
[MAILPOET-4935]
2023-03-30 12:21:25 +02:00
b2bd4e7721 Define type of return value
[MAILPOET-4935]
2023-03-30 12:21:25 +02:00
0d12c05fb9 Improve readability
[MAILPOET-4935]
2023-03-30 12:21:25 +02:00
ce6c9dfcdb Remove unnecessary check
[MAILPOET-4935]
2023-03-30 12:21:25 +02:00
9d9b3f58c4 Use WooCommerce helper to fetch order
[MAILPOET-4935]
2023-03-30 12:21:25 +02:00
8cf48d2707 Simplify SubjectTransformer
[MAILPOET-4935]
2023-03-30 12:21:25 +02:00
68f09b6bd1 Prevent infinite loop when a subject from the trigger is missing
Given the trigger provides two subjects but only one subject was given via parameter and no
transformer was able to generate the second from the first, this method runs into an
infinite loop. This commit prevents this infinite loop.

[MAILPOET-4935]
2023-03-30 12:21:25 +02:00
b5a846327a Remove SubjectTransformerHandler from StepHandler
All subjects are created and persisted during AutomationRun creation. Therefore, the required
subject must exist when searching for it in the StepHandler. This commit reverses the last
changes and updates the test.

[MAILPOET-4935]
2023-03-30 12:21:25 +02:00
d365be2334 Persist all possible subject on run creation
[MAILPOET-4935]
2023-03-30 12:21:25 +02:00
c968b03ca7 Provide all possible subjects for a trigger to the UI
[MAILPOET-4935]
2023-03-30 12:21:25 +02:00
6fa85ef879 Test order to subscriber subject transformation
[MAILPOET-4935]
2023-03-30 12:21:25 +02:00
301a10b210 Move TestAction to Stubs
[MAILPOET-4935]
2023-03-30 12:21:25 +02:00
2bba70125c Add order status change statistic to analytics
[MAILPOET-4935]
2023-03-30 12:21:25 +02:00
f1f667c355 Add order status change trigger frontend
[MAILPOET-4935]
2023-03-30 12:21:25 +02:00
d0659f638c Add order to subscriber transformer
[MAILPOET-4935]
2023-03-30 12:21:25 +02:00
e140dc6d4e Add WooCommerce integration and order status trigger backend
[MAILPOET-4935]
2023-03-30 12:21:25 +02:00
e081c554aa Add method to retrieve order statuses
[MAILPOET-4935]
2023-03-30 12:21:25 +02:00
5328213d85 Introduce subject transformation
[MAILPOET-4935]
2023-03-30 12:21:25 +02:00
06874645c7 Add nightly testing and update CircleCI and RoboFile
[MAILPOET-4954
2023-03-30 11:03:28 +02:00
a24c5f5869 Exclude test from scenarios
[MAILPOET-4954
2023-03-30 11:03:28 +02:00
568918f1fc Include the test in scenarios
[MAILPOET-4954]
2023-03-30 11:03:28 +02:00
c7e01e0cb1 Add new k6 test newsletter statistics
[MAILPOET-4954]
2023-03-30 11:03:28 +02:00
5297333d6a Optimize tests and improve existing
[MAILPOET-4958]
2023-03-30 11:03:28 +02:00
eaa2085fba Use replace instead of push
[MAILPOET-5140]
2023-03-30 10:09:04 +02:00
bc43aaaeb7 Remove MSS pitch if key already active
[MAILPOET-5140]
2023-03-30 10:09:04 +02:00
7570c7ecfe Fix PNPM permission error when setting up the dev env
This commit fixes the following error when running ./do setup to configure the dev env on a new Linux machine:

```
[ExecStack] Running pnpm install --frozen-lockfile --prefer-offline
Internal Error: EACCES: permission denied, mkdir '/.cache'
Error: EACCES: permission denied, mkdir '/.cache'
```

It sets the $XDG_DATA_HOME variable to /tmp/.cache in docker-compose.yml. This will affect other programs that rely on $XDG_DATA_HOME, but it is probably harmless. I was not able to find an env variable that is specific to PNPM, and that would affect only the location of its cache directory (https://pnpm.io/next/npmrc#cache-dir).

[MAILPOET-5177]
2023-03-30 08:25:29 +02:00
d0c92627e9 Update the host key per GH instruction
https://github.blog/2023-03-23-we-updated-our-rsa-ssh-host-key/

[MAILPOET-5173]
2023-03-29 14:32:36 +03:00
8e0211913a Add basic integration test for the new single order value WC segment
[MAILPOET-4988]
2023-03-28 15:51:01 +02:00
68d69cb8bb Add basic acceptance tests for the new single order value WC segment
[MAILPOET-4988]
2023-03-28 15:51:01 +02:00
b1a940aded Add basic unit test for FilterDataMapper when using WooCommerceSingleOrderValue
[MAILPOET-4988]
2023-03-28 15:51:01 +02:00
b963d8b988 Add a new WooCommerce segment based on the value of the orders
[MAILPOET-4988]
2023-03-28 15:51:01 +02:00
47ca0d926b Exempt <hr> from being stripped when display type is full
[MAILPOET-5114]
2023-03-28 15:20:10 +02:00
3ed92e2de9 Release 4.10.0 2023-03-28 12:09:26 +03:00
ae28e62b1a Add documentation for the unsubscribe() MP API method
[MAILPOET-5152]
2023-03-27 19:25:49 +02:00
45f59770fc Add reason for unsubscribing to the admin when using MP API
This commit adds the string about unsubscribing using the MP API to the
subscribers page in the admin. Without this we were showing a generic
message "Unsubscribed for an unknonw reason".

[MAILPOET-5152]
2023-03-27 19:25:49 +02:00
c507229dd2 Add unsubscribe API method
It can be used by calling:

```
$mailpoet_api = \MailPoet\API\API::MP('v1');
$mailpoet_api->unsubscribe($subscriberId);
```

[MAILPOET-5152]
2023-03-27 19:25:49 +02:00
d37b961c2b Use getServiceWithOverrides() to create an instance of Subscribers
By using this helper method, we don't need to change the code that
instantiate Subscribers whenever the class signature changes as it is
going to happen in a subsequent commit.

[MAILPOET-5152]
2023-03-27 19:25:49 +02:00
a90a1462f4 Fix translations after conflict resolving
[MAILPOET-4397]
2023-03-27 17:24:03 +02:00
17c206ef8f Ensure confirmation displays for pausing
MAILPOET-4397
2023-03-27 17:24:03 +02:00
644e0f3e0f Confirm in editor if not already confirmed
MAILPOET-4397
2023-03-27 17:24:03 +02:00
b30a9af4ad Display deactivation warning when clicking subjects
MAILPOET-4397
2023-03-27 17:24:03 +02:00
62dcee8ae9 Merge newsletter tests config into ES5 config
[MAILPOET-5015]
2023-03-27 15:24:38 +02:00
8d311f2d9f Rexpose globals for usage in config overrides
[MAILPOET-5015]
2023-03-27 15:24:38 +02:00
263e8f6f4d Remove redundant rule exception (same value as from parent configs)
[MAILPOET-5015]
2023-03-27 15:24:38 +02:00
ccbd239009 Remove premium-specific TS config, move free-specific rules to its config
[MAILPOET-5015]
2023-03-27 15:24:38 +02:00
7dd5ca91c5 Remove premium-specific ES config, move free-specific rules to its config
[MAILPOET-5015]
2023-03-27 15:24:38 +02:00
5d03be50f3 Remove rule definition that's already included in parent configs
[MAILPOET-5015]
2023-03-27 15:24:38 +02:00
30f5a48b9d Use the new ESLint config for ./do qa:fix-file
[MAILPOET-5015]
2023-03-27 15:24:38 +02:00
f04f7755fd Reexport eslint bin in @mailpoet/eslint-config explicitly
We're using @mailpoet/eslint-config to share eslint itself so it's
correct to reexport the executable that's being used. This also makes
the command work in the premium plugin without need to address the
".bin" paths within "node_modules".

[MAILPOET-5015]
2023-03-27 15:24:38 +02:00
ed8a3344af Rewrite .eslintrc.premium.ts.js to new config format
[MAILPOET-5015]
2023-03-27 15:24:38 +02:00
e2d658e5fc Rewrite .eslintrc.premium.js to new config format
[MAILPOET-5015]
2023-03-27 15:24:38 +02:00
542ac60626 Increase JS heap size for eslint
[MAILPOET-5015]
2023-03-27 15:24:38 +02:00
635a23bd87 Exclude irrelevant files from linting early to save memory
[MAILPOET-5015]
2023-03-27 15:24:38 +02:00
3d25b73fc6 Remove no longer used .eslintignore
[MAILPOET-5015]
2023-03-27 15:24:38 +02:00
989fd7d1cb Rewrite .eslintrc.tests_newsletter_editor.js to new config format
[MAILPOET-5015]
2023-03-27 15:24:38 +02:00
3b321de91e Rewrite .eslintrc.ts.js to new config format
[MAILPOET-5015]
2023-03-27 15:24:38 +02:00
afb5456759 Rewrite .eslintrc.es6.js to new config format
[MAILPOET-5015]
2023-03-27 15:24:38 +02:00
d37292ff13 Rewrite .eslintrc.es5.js to new config format
[MAILPOET-5015]
2023-03-27 15:24:38 +02:00
c7c06d0a21 Install @eslint/eslintrc explicitly
[MAILPOET-5015]
2023-03-27 15:24:38 +02:00
2b5826d417 Install globals explicitly
[MAILPOET-5015]
2023-03-27 15:24:38 +02:00
1d3722b6d3 Fix errors reported by ESLint
[MAILPOET-5015]
2023-03-27 15:24:38 +02:00
a919275c24 Allow passing async function to JSX attributes
The new default seems to be a bit too strict.

[MAILPOET-5015]
2023-03-27 15:24:38 +02:00
d902ec446c Update eslint-plugin-import
[MAILPOET-5015]
2023-03-27 15:24:38 +02:00
d1b691f69c Update eslint-plugin-jsx-a11y
[MAILPOET-5015]
2023-03-27 15:24:38 +02:00
d2d12e30ec Update eslint-plugin-no-only-tests
[MAILPOET-5015]
2023-03-27 15:24:38 +02:00
bd66929731 Update eslint-config-prettier
[MAILPOET-5015]
2023-03-27 15:24:38 +02:00
84ef2f1427 Update eslint-config-airbnb-typescript
[MAILPOET-5015]
2023-03-27 15:24:38 +02:00
80d5d35e25 Update eslint-plugin-react and eslint-plugin-react-hooks
[MAILPOET-5015]
2023-03-27 15:24:38 +02:00
45b473a53f Update @typescript-eslint/parser and @typescript-eslint/eslint-plugin
[MAILPOET-5015]
2023-03-27 15:24:38 +02:00
ba90249cc2 Update @babel/eslint-parser and lint-staged (needed for update of the former one)
[MAILPOET-5015]
2023-03-27 15:24:38 +02:00
afbaac8439 Update ESLint
[MAILPOET-5061]
2023-03-27 15:24:38 +02:00
0cb684151f Use JS ESLint configs instead of JSON
This is to avoid ERR_IMPORT_ASSERTION_TYPE_MISSING on recent Node.js with updated ESLint.
Fixes errors like the following: ".eslintrc.es6.json" needs an import assertion of type "json"

[MAILPOET-5061]
2023-03-27 15:24:38 +02:00
4836a4c66f Try to show only one form of the same id
Since we are using hooks to add form html to the page
other plugins can cause MailPoet to add the form several
times, this commit adjusts the JS to show the forms of the
same id at only once

[MAILPOET-5136]
2023-03-27 13:27:06 +02:00
7cc6765493 Fix minutes text
[MAILPOET-4602]
2023-03-27 12:54:02 +02:00
9a3a7f420c Add minutes scheduling for purchased product
[MAILPOET-4602]
2023-03-27 12:54:02 +02:00
dfc4334a1d Add minutes scheduling for purchased in category
[MAILPOET-4602]
2023-03-27 12:54:02 +02:00
8603de7124 Add minutes scheduling for first purchase
[MAILPOET-4602]
2023-03-27 12:54:02 +02:00
354ed92076 Add minutes scheduling for abandoned Cart
[MAILPOET-4602]
2023-03-27 12:54:02 +02:00
7f1ef637cc Change scheduling post notification from an hour precision to 15 minutes
[MAILPOET-4602]
2023-03-27 12:54:02 +02:00
77b83ff188 Change scheduling newsletters from an hour precision to 15 minutes
[MAILPOET-4602]
2023-03-27 12:54:02 +02:00
c63434fa1c Add welcome email scheduling with minute resolution
[MAILPOET-4602]
2023-03-27 12:54:02 +02:00
e1be576525 Fix coding style issue in Woo Subscriptions filter test
[MAILPOET-4568]
2023-03-27 12:26:35 +02:00
f0e954e356 Fix usage of status parameter in Woo Subscriptions data factory
[MAILPOET-4568]
2023-03-27 12:26:35 +02:00
58b2ac4a60 Add collation check to WooSubscriptions filter
We join using a string column and it may cause errors when the columns
using different collation. This commit adds collation check so that we can alter
collation in the join condition in case it is needed.
[MAILPOET-4568]
2023-03-27 12:26:35 +02:00
3a627f4d99 Re-enable acceptance test for Woo Subscriptions segment
[MAILPOET-4568]
2023-03-27 12:26:35 +02:00
78fbb7d6bc Update WooCommerce and plugins in tests on CI
We need to use HPOS compatible Woo Subscriptions
[MAILPOET-4568]
2023-03-27 12:26:35 +02:00
4200781a56 Remove temporary action for disabling Woo compatibility check in test
WooSubscriptions declared compatibility with HPOS in version 4.9.0
[MAILPOET-4568]
2023-03-27 12:26:35 +02:00
bb9b04ecc8 Update WooSubscription filter to work with HPOS data
The wc_orders table doesn't contain user_id but has billing_email and customer_id.
These were two options I could use for joining subscribers table.
I could use the customer_id but I would have to join wc_customer_lookup table and then
the orders table. Instead of customer_id I chose the billing_email. Both tables have
indexes on the email columns and it is one join instead of two.
[MAILPOET-4568]
2023-03-27 12:26:35 +02:00
78feddd30a Enable WooSubscriptions test when HPOS is active
We need to temporarily turn off plugin compatibility check in Woo
because current Woo Subscriptions are still officially not marked as
HPOS compatible.
[MAILPOET-4568]
2023-03-27 12:26:35 +02:00
14515c4140 Refactor WooSubscriptions integration test to use factory instead post
The factory uses wcs_create_subscription and creates the subscription order
in proper table according to HPOS setting.
[MAILPOET-4568]
2023-03-27 12:26:35 +02:00
ab708359d1 Ensure plugin functions are loaded
[MAILPOET-5085]
2023-03-27 11:35:48 +02:00
535f880c8d Use a better transient key
[MAILPOET-5085]
2023-03-27 11:35:48 +02:00
0f4ffd7849 Use get_plugin_data from WPFunctions
[MAILPOET-5085]
2023-03-27 11:35:48 +02:00
cf88a3fab2 Display warning for unsupported WooCommerce version
[MAILPOET-5085]
2023-03-27 11:35:48 +02:00
46b3c65fdf Enforce the minimum working version of WooCommerce
[MAILPOET-5085]
2023-03-27 11:35:48 +02:00
6a53b9b808 Fix strange 0 being rendered when there are no changes in lists
[MAILPOET-5150]
2023-03-27 10:58:19 +02:00
695c387210 Use better wayt to determine email ID existence
[MAILPOET-5138]
2023-03-23 16:23:40 -05:00
d6d46ec57a Fix wrong type assertion
[MAILPOET-5138]
2023-03-23 16:23:40 -05:00
32951c050d Define missing Tooltip property
[MAILPOET-5138]
2023-03-23 16:23:40 -05:00
403ea6022e Remove no longer needed hotfixes
[MAILPOET-5138]
2023-03-23 16:23:40 -05:00
d7ccd75744 Fix type in comparison
[MAILPOET-5138]
2023-03-23 16:23:40 -05:00
997fc06c5d Ensure number comparison
[MAILPOET-5138]
2023-03-23 16:23:40 -05:00
c9922d32d8 Fix invalid check for an empty array
[MAILPOET-5138]
2023-03-23 16:23:40 -05:00
d58373fa61 Allow object-like types in withBoundary
[MAILPOET-5138]
2023-03-23 16:23:40 -05:00
7bf7b182f9 Remove redundant extensions in imports
[MAILPOET-5138]
2023-03-23 16:23:40 -05:00
2be8952824 Update TypeScript to version 5.0
[MAILPOET-5138]
2023-03-23 16:23:40 -05:00
2d0228e4e4 Add top-level build and start scripts
[MAILPOET-5015]
2023-03-22 09:38:22 +01:00
65fefd3d73 Add composite tsconfig option for faster rebuilds
Due to https://github.com/microsoft/TypeScript/issues/33827 we need to explicitly
name JSON files in the "include" array, until we upgrade to a more recent TypeScript.

[MAILPOET-5015]
2023-03-22 09:38:22 +01:00
41aa211ee6 Add incremental tsconfig option for faster rebuilds
[MAILPOET-5015]
2023-03-22 09:38:22 +01:00
b97f2d5850 Use "esnext" module as a default in tsconfig
[MAILPOET-5015]
2023-03-22 09:38:22 +01:00
900a03756f Use (S)CSS setup from @worpress/scripts
[MAILPOET-5015]
2023-03-22 09:38:22 +01:00
995f61f6fd Add @mailpoet/components to the mailpoet plugin
[MAILPOET-5015]
2023-03-22 09:38:22 +01:00
8fbe37dc4d Add TypeScript config for @mailpoet/components
This handles both type checking and type declaration emitting.

[MAILPOET-5015]
2023-03-22 09:38:22 +01:00
2aaf01fe11 Add Webpack config for @mailpoet/components
[MAILPOET-5015]
2023-03-22 09:38:22 +01:00
093814eaa7 Add Babel config for @mailpoet/components
[MAILPOET-5015]
2023-03-22 09:38:22 +01:00
790f3f4974 Add @mailpoet/components package with a dummy testing component
[MAILPOET-5015]
2023-03-22 09:38:22 +01:00
a31af24205 Add type "module" to monorepo root
This will allow us using ES modules in scripts and config files.

[MAILPOET-5015]
2023-03-22 09:38:22 +01:00
dd1abb909a Hoist @wordpress/scripts to monorepo root
This way the same version will be used by all packages and tools.

[MAILPOET-5015]
2023-03-22 09:38:22 +01:00
cdf4cd759b Hoist typescript to monorepo root
This way the same version will be used by all packages and tools.

[MAILPOET-5015]
2023-03-22 09:38:22 +01:00
7fbb53e452 Fix possible scrollbar in forms
[MAILPOET-5116]
2023-03-22 09:20:57 +01:00
2547f4bfbd Replace old model usages by Doctrine
[MAILPOET-4303]
2023-03-22 09:20:11 +01:00
2ead4214cd Move query with inserting task subscribers to repository
[MAILPOET-4303]
2023-03-22 09:20:11 +01:00
f80dfec1fb Remove old model from Bounce worker integration test
[MAILPOET-4303]
2023-03-22 09:20:11 +01:00
5978baf5fa Extend integration test for Bounce worker
[MAILPOET-4303]
2023-03-22 09:20:11 +01:00
bc1711f35f Fix plugin release version 2023-03-22 08:24:04 +01:00
c77e78152b Release 4.9.0 2023-03-22 08:24:04 +01:00
942dd5d538 Add missing CSS for the form editor
The CSS is needed for some inner parts of the block editor like
displaying block placeholders.
[MAILPOET-5146]
2023-03-21 21:06:26 +01:00
29f02344c5 Execute mailpoet_scripts_admin_before hook
[PREMIUM-229]
2023-03-21 11:34:30 +01:00
d14ce5410b Fix bold labels in forms
We save the falsy value for bold as "0" which was causing that labels
were rendered bold in front end also when the checkbox was disabled.
[MAILPOET-5139]
2023-03-20 17:24:31 +01:00
274a77ea92 Update from front end rendering to support font sizes with units
[MAILPOET-5139]
2023-03-20 17:24:31 +01:00
ce41438d65 Fix loading saved global font size in the form editor
We now support also strings containing value and unit.
[MAILPOET-5139]
2023-03-20 17:24:31 +01:00
70f30a54f1 Scale icon
[PREMIUM-222]
2023-03-20 15:16:18 +01:00
f802eb0978 Remove period at end of subtitle
[PREMIUM-222]
2023-03-20 15:16:18 +01:00
645bd7945d Add Unsubscribe Action Stub
[PREMIUM-222]
2023-03-20 15:16:18 +01:00
3756a9b696 Add missing translation domains
[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
afe5bc6571 Fix translation for frequency in for re-engagement emails
[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
6ec3b33ecc Add a missing translations
[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
ba619fb7ac Exclude irrelevant files from being parsed for translations
[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
cac89e472a Adjust translations:build command to use wp from vendor dir
[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
372306e739 Add missing code back
Some part of code had been removed by mistake for solving
merge conflicts

[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
0c1ff84fe7 Fix issue with newsletter form fields not getting translated
[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
55153719e9 Manually bump version to beta.3
[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
2adc7fbc5e Add commons.js via wp_enqueue_script
[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
a24b510e82 Use @wordpress/i18n for rest of common folder
[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
8adcdf76e4 Use @wordpress/i18n for template boxes
[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
60e38b9b40 Wait for coupon settings panel to close before proceeding
This should fix the flakiness of EditorCouponCest::addCoupon

[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
441d998bab Manually bump version to beta.1
[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
d26083a655 Fix the issue in image block not working with lodash
As per import of @wordpress/i18n, and since it's using lodash
We'll need to reset window._ to underscore where we have a hard
dependency to underscore

[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
b007f5ede2 Fix code formatting issue
[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
54f0d414d3 Add missing translatable messages
[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
90b5c03e51 Fix wrong import order
[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
dd1b162199 Use @wordpress/i18n for coupon block
[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
c42288c5ab Add missing translation
[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
096e8f7963 Fix regression for newly added translation
[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
c9c75c8c6d Add admin.js to all admin pages using AssetController
[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
0a11fadb05 Enqueue newletter assest using asset controller
[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
1c6d461129 Translate some more common strings using wp/i18n
[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
befe68b721 Fix issue causing newsletter tests to fail
Accessing wp from global scope was making the tests fail

[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
c54a414d51 Make sure translations are loaded for newsletter editor
[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
67c7535051 Move code around to make registerTranslations accesable
[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
9b14add577 Unify wording that was causing tests to fail
Test were sometimes using `Delete permanently` and sometimes
`Delete Permanently` with capital P, causing some to fail

[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
f99bc544cf Use wp/i18n in components that's used for newsletter app
[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
c5bcd8927a Use translator from @wordpress/i18n in newsletter app
[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
f329306b1a Remove editor translations from tpl and add via wp/i18n
[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
005c5196c9 Fix memory issue when building translations
[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
ece4977d6a Add newsletter_editor.js using AssetsController
newsletter_editor.js was added via newsletter/editor.html
it's now removed from the template and wpEnqueueScript is
user instead

[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
cac0c8e93d Exclude the test from scenarios
[MAILPOET-4958
2023-03-20 10:01:57 +01:00
44489a1030 Optimize tests and improve existing
[MAILPOET-4958]
2023-03-20 10:01:57 +01:00
0a125b8aeb Add new test complex segment
[MAILPOET-4958
2023-03-20 10:01:57 +01:00
eb74b55b62 Fix radio control option alignment
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
5d8672ca27 Fix form editor global styles font size picker
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
9c74068039 Fix automation name button style
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
960518fd57 Fix form editor style settings styles after Gutenberg upgrade
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
a912f3500c Fix form editor block inserter styles after Gutenberg upgrade
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
b15ad9692c Simplify slot rendering in automations
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
b20690261f Fix font size picker trying to process numbers as strings
This fixes the "fontSizeValue.startsWith is not a function" error. It seems that the font size picker
now always expects strings, while the values from SETTINGS_DEFAULTS could be numbers,
and we've been using numbers throughout our codebase as well.

This also enables the usage of any font size units, such as em and rem.

This may be related to: https://github.com/WordPress/gutenberg/issues/44857

[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
551d6730db Remove forgotten workarounds
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
2e80af9876 Render automation name dropdown centered
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
4c1164b89b Use relative imports that are resolvable for types in premium
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
29970af07f Add extensible interface for automation editor store
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
7b0bed4c19 Remove unused OmitFirstArgs and OmitFirstArg type helpers
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
4477932245 Alter export of modules from dynamic segments for premium and extend types
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
d7c5a53091 Fix rest of Typescript issues
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
f5a08dc2f3 Fix unknown properties type issues
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
d61d558eef Fix type issues in dynamic segments
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
412cb56b02 Fix types for @wordpress/notices
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
77b6b61937 Add store types for @wordpress packages
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
534e7ee708 Reintroduce store name as identifier in automation editor store
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
898a479860 Reintroduce store name as identifier in dynamic segments store
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
2ba5a6b512 Reintroduce store name as identifier in dynamic segments store
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
895073972d Reintroduce store name as identifier in form editor and templates stores
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
b8d00e24ec Reintroduce store name as identifier in settings store
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
8233b9876a Reintroduce store name as identifier in automation listing store
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
2950862114 Add typings for all @wordpress/data store selection variants
Both store name and store descriptor typings should work in all cases.

[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
0ce3eed33b Fix types in form editor hooks
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
0c427a415e Fix rendering options in option-button
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
ddb43a3d76 Refactor settings store init to use new api
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
566a329ec6 Fix dependency cycles in form editor
[MAILPOET-5120]
2023-03-15 21:03:06 +01:00
da28bb8578 Fix Type errors related to block-editor store
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
50ff982fd4 Fix TS issues related to core/notice store
@types/wordpress__notice uses @types/wordpress_data but these are no
longer updated and combination with build types from the latest @wordpress/data
causes issues.
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
2818998f63 Fix this.context is unknown error in send.tsx
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
b115289d2b Fix ErrorBoundary type errors
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
f794a0b0f6 Use new @wordpress/data types in form templates app
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
a8916a2b78 Use new @wordpress/data types in dynamic segments
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
5890b74598 Use new @wordpress/data types in homepage
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
a64882101f Use new @wordpress/data types in form editor
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
7919cf2835 Use new @wordpress/data types in automations
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
db101cab7e Make @wordpress/data type definitions compatible with current version
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
ce4f12312f Update dev env node version to 19
After the updates some packages that we use in zip build don't work
with node17. This commit updates dev env to the most recent node version.
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
7c2526bc87 Update classnames in automations editor
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
6eb00c7eac Fix radio buttons groups to display inline in form editor
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
726017d795 Unify form editor styles panels labels with post editor labels
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
291a1637c1 Update Custom font selector toolbar in form editor
This commit fixes CSS which was preventing clicking the custom font select component
and suppresses a deprecation warning by adding __nextUnconstrainedWidth property.
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
37ad1d1275 Fix Can't resolve 'process/browser'
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
92c52fd9f1 Update WordPress JS dependencies and React
Most of the WordPress packages already upgraded to react 18 and use
new hooks so we need to upgrade also the react libs.
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
e21cc48dc2 Add vendor/soundasleep back to RoboFile::qaLintBuild
Update it so that it's added from vendor-prefixed

[MAILPOET-5128]
2023-03-15 15:02:32 -03:00
7185d1286e Update traces of vendor/soundaslee in Robofile
[MAILPOET-5128]
2023-03-15 15:02:32 -03:00
ef3c64b85d Adjust use Html2Text from MailPoetVendor namespace
[MAILPOET-5128]
2023-03-15 15:02:32 -03:00
fb0ef238da Remove Html2Text from main composer.json and add it via prefixer
[MAILPOET-5128]
2023-03-15 15:02:32 -03:00
01234cb35d Update action-scheduler package to fix PHP 8.2 decrecations 2023-03-14 14:00:54 -03:00
7b8dcb3fb1 Release 4.8.1 2023-03-14 13:12:11 +01:00
3333f178b1 Fix clicking a link in homepage redirecting to parent target
[MAILPOET-5126]
2023-03-14 11:49:49 +01:00
0f3050c93b Change date after schedule button check
[MAILPOET-4869]
2023-03-13 16:07:40 -05:00
11be7e914a Update acceptance tests to work with new homepage as main page
[MAILPOET-4831]
2023-03-13 14:09:17 +01:00
29914ac6ca Add tracking of homepage task list tasks
[MAILPOET-4831]
2023-03-13 14:09:17 +01:00
a132e6175b Extract cta clicks tracking function on homepage
[MAILPOET-4831]
2023-03-13 14:09:17 +01:00
ff771d7b84 Use slug for tracking product discovery tasks
The title is translated so for tracking we need a value that remains the same.
[MAILPOET-4831]
2023-03-13 14:09:17 +01:00
68e01ccf9f Add migration for setting initial homepage state for old users
[MAILPOET-4831]
2023-03-13 14:09:17 +01:00
d81571dd47 Update CSS selector for automations menu link beta flag
[MAILPOET-4831]
2023-03-13 14:09:17 +01:00
d832925107 Remove temporary static property for the plugin main page
The property was added so that we were able to set the main page
dynamically based on the feature switch value. This is no longer needed and
we can use the hardcoded constant as we did before.
[MAILPOET-4831]
2023-03-13 14:09:17 +01:00
0f01755e18 Remove homepage feature switch
[MAILPOET-4831]
2023-03-13 14:09:17 +01:00
96760cc7e4 Remove Promise in all tests and change with await
[MAILPOET-5105]
2023-03-10 12:22:10 +01:00
4c9aa7c0ab Refactor tests to use k6 browser experimental
[MAILPOET-5105]
2023-03-10 12:22:10 +01:00
4f43cc1e80 Refactor formsAdding 2023-03-10 12:22:10 +01:00
ce4aa37326 Add translating validation error messages for custom fields
[MAILPOET-4901]
2023-03-09 14:45:44 +01:00
0487ad50cb Add an action to display pull request stats 2023-03-09 13:08:48 +01:00
d54e666eea Fix ordering by subscriber
[MAILPOET-4660]
2023-03-09 13:02:45 +01:00
163578b9bc Add acceptance test with receiving scheduled newsletter
[MAILPOET-4719]
2023-03-09 10:51:34 +01:00
19ae4ea2ac Refactor code to k6
[MAILPOET-4957]
2023-03-08 17:00:09 +01:00
262df3444d Rebase and switch x to experimental
[MAILPOET-4957]
2023-03-08 17:00:09 +01:00
20fa66daf1 Update the test name
[MAILPOET-4957]
2023-03-08 17:00:09 +01:00
0a2ccd6015 Add a new k6 test view subscribers of a list
[MAILPOET-4957]
2023-03-08 17:00:09 +01:00
9dd4b05c09 Finalize the test and update text verification in formsAdding
[MAILPOET-4951]
2023-03-08 08:47:47 +01:00
b2cca8d123 Add a new test newsletter sending
[MAILPOET-4951]
2023-03-08 08:47:47 +01:00
20f495922b Release 4.8.0 2023-03-07 15:23:20 +02:00
03b94e557a Acceptance: add test for corrupt/resume newsletter with coupon
[MAILPOET-5040]
2023-03-07 10:48:14 +01:00
b10bdefdb2 Acceptance: assert notice shown when coupon can't generate
[MAILPOET-5040]
2023-03-07 10:48:14 +01:00
dee57d5425 Assert can send newsletter with predefined coupon
[MAILPOET-5040]
2023-03-07 10:48:14 +01:00
c61dccf9de Acceptance: assert newsletter with coupon is received
[MAILPOET-5040]
2023-03-07 10:48:14 +01:00
e53f8393b1 Move newsletter types to common
[PREMIUM-227]
2023-03-06 17:15:31 +01:00
3ec2a187de Force a re-render when resuming a corrupt newsletter
[MAILPOET-5104]
2023-03-06 12:53:02 +01:00
4166fd2111 Add default value for the coupon code
[MAILPOET-5096]
2023-03-06 11:29:39 +01:00
0cbe4fa9fd Add AutomateWoo opt-in acceptance test
[MAILPOET-5057]
2023-03-06 11:22:58 +01:00
bf234cdd6e Update removeAction definition to match original WP function
[MAILPOET-5057]
2023-03-06 11:22:58 +01:00
a9b4b57fd6 Merge checkout opt-ins from AutomateWoo and MailPoet
[MAILPOET-5057]
2023-03-06 11:22:58 +01:00
436215aa82 Update x to experimental
[MAILPOET-4952] & [MAILPOET-4953]
2023-03-06 09:24:37 +01:00
6ef87eacee Add test for newsletter filtering by a list
[MAILPOET-4952] & [MAILPOET-4953]
2023-03-06 09:24:37 +01:00
b0244cbc5f Add a new k6 test search for a newsletter
[MAILPOET-4952]
2023-03-06 09:24:37 +01:00
4c506a349d Fix acceptance test for upsell section
The browser remembers scroll position after reload so we need to
scroll back to top to see the close button.
The error was not present before because the images were not in the cdn.
[MAILPOET-4829]
2023-03-03 14:55:13 +01:00
959f66663b Fix issues in homepage resources content
[MAILPOET-4829]
2023-03-03 14:55:13 +01:00
bfa66956d9 Add useCallback to reduce number of anonymous functions
[MAILPOET-4829]
2023-03-03 14:55:13 +01:00
b2054eafc5 Add acceptance test for homepage resources section
[MAILPOET-4829]
2023-03-03 14:55:13 +01:00
9531ceefbc Add images for rest of the posts in homepage resources section
[MAILPOET-4829]
2023-03-03 14:55:13 +01:00
2bd64f96d3 Add styles for the resources section on homepage
[MAILPOET-4829]
2023-03-03 14:55:13 +01:00
222392d9de Add pagination for resources posts on homepage
[MAILPOET-4829]
2023-03-03 14:55:13 +01:00
8c837a4df2 Add resources simple posts with data
Resources thumbnails are not available for all posts so as for now I'm
reusing the thumbnails from the first two posts.
[MAILPOET-4829]
2023-03-03 14:55:13 +01:00
3efaf67eeb Add an empty resources section to homepage
[MAILPOET-4829]
2023-03-03 14:55:13 +01:00
a3a06af731 Update x to experimental
[MAILPOET-4959]
2023-03-03 11:46:27 +01:00
5ecbd4370b Complete the test
[MAILPOET-4959]
2023-03-03 11:46:27 +01:00
de5d34e03a Add a new k6 test adding new form
[MAILPOET-4959]
2023-03-03 11:46:27 +01:00
155eb28889 Additionally decrease tresholds checks 2023-03-02 15:21:29 +01:00
4d0f7d8b66 Decrease scenario tresholds 2023-03-02 15:21:29 +01:00
1fd85ee873 Remove unnecessary circleci configs
[MAILPOET-4945]
2023-03-02 15:21:29 +01:00
4b9f78267c Fix a method in the helper
[MAILPOET-4945]
2023-03-02 15:21:29 +01:00
b09710368a Update subscribers adding test to include experimental k6 2023-03-02 15:21:29 +01:00
ae857bdeaa Increased percentage of thresholds
[MAILPOET-4945]
2023-03-02 15:21:29 +01:00
f826ce52d6 Upgrade to k6 v0.43.1
[MAILPOET-4945]
2023-03-02 15:21:29 +01:00
db029bbbaa Revert the password
[MAILPOET-4945]
2023-03-02 15:21:29 +01:00
77cf9997bc Ensure performance tests output directory
[MAILPOET-4945]
2023-03-02 15:21:29 +01:00
d30772ea7c Run performance tests directly from PHP
[MAILPOET-4945]
2023-03-02 15:21:29 +01:00
ccfce23c30 Update xk6browser and circleci config
[MAILPOET-4945]
2023-03-02 15:21:29 +01:00
a103f589b8 Change Docker image used and test command
[MAILPOET-4945]
2023-03-02 15:21:29 +01:00
fe6357864d Include performance tests in nightly workflow 2023-03-02 15:21:29 +01:00
5e497e3ddb Include performance tests in workflows
[MAILPOET-4945]
2023-03-02 15:21:29 +01:00
75723d5af6 Add integration between CircleCI and k6
[MAILPOET-4945]
2023-03-02 15:21:29 +01:00
13daff5883 Remove status check as the first step might have already been executed
[MAILPOET-5097]
2023-03-02 15:16:13 +01:00
c0e226b4bb Do not use associative array
[MAILPOET-5097]
2023-03-02 15:16:13 +01:00
212e01dd4c Add check that function error_log exists
[MAILPOET-5026]
2023-03-02 13:59:51 +01:00
71aef99607 Remove usage Sending::createFromQueue from SendingQueue worker test
[MAILPOET-4369]
2023-03-02 12:39:35 +02:00
26a85458a5 Remove usage Sending::createFromQueue from Scheduler test
[MAILPOET-4369]
2023-03-02 12:39:35 +02:00
cc032b7520 Remove old model from Task test
[MAILPOET-4369]
2023-03-02 12:39:35 +02:00
20e435872f Add method for update processed subscribers
[MAILPOET-4369]
2023-03-02 12:39:35 +02:00
6a1e734633 Fix WooCommerce wording
[MAILPOET-5098]
2023-03-02 11:30:38 +01:00
b91f2cde2b Fix another merge conflict issue preventing correct resuming
[MAILPOET-4983]
2023-03-01 17:46:22 +01:00
7c425a6b9a Fix wrong import orders
[MAILPOET-4983]
2023-03-01 17:46:22 +01:00
f1a2954dca Remove duplicate line
[MAILPOET-4983]
2023-03-01 17:46:22 +01:00
5e74dce6bd Defer resetting errors when resuming to confirmation step
[MAILPOET-4983]
2023-03-01 17:46:22 +01:00
Sam
a641521e0f Apply suggestions from code review to shorten js imports
[MAILPOET-4983]

Co-authored-by: Oluwaseun Olorunsola <30554163+triple0t@users.noreply.github.com>
2023-03-01 17:46:22 +01:00
bd3a3a116e Fix failing unit test for coupon block
[MAILPOET-4983]
2023-03-01 17:46:22 +01:00
9b87698819 Immediately pause sendingQueue when a newsletter is corrupted
[MAILPOET-4983]
2023-03-01 17:46:22 +01:00
f92f045142 Fix issue caused by rebasing trunk
[MAILPOET-4983]
2023-03-01 17:46:22 +01:00
c84a6894ba Throw and log the issue if coupon was not found when rendering
[MAILPOET-4983]
2023-03-01 17:46:22 +01:00
534bff5a80 Show a notice on top of newsletter listing for corrupt emails
[MAILPOET-4983]
2023-03-01 17:46:22 +01:00
ce917280d4 Confirm resuming a corrupt newsletter
[MAILPOET-4983]
2023-03-01 17:46:22 +01:00
b6577565b6 Update status of corrupt newsletter after edit
[MAILPOET-4983]
2023-03-01 17:46:22 +01:00
9ca259d1d0 Exclude corrupt emails when fetching queue newsletters
[MAILPOET-4983]
2023-03-01 17:46:22 +01:00
4242442d8e Fix logger test failing on newly recorded properties
[MAILPOET-4983]
2023-03-01 17:46:22 +01:00
0795c2ffff Expose the log for corrupted newsletter on listing page
[MAILPOET-4983]
2023-03-01 17:46:22 +01:00
ddd89e70ed Add context and raw message to mailpoet_logs
[MAILPOET-4983]
2023-03-01 17:46:22 +01:00
fe93b1a150 Show rendering issue in listing status
[MAILPOET-4983]
2023-03-01 17:46:22 +01:00
87925dbd9c Convert queue_status.jsx to tsx and add missing types
[MAILPOET-4983]
2023-03-01 17:46:22 +01:00
4192f82d29 Throw instead of directly logging when WC is not active
[MAILPOET-4983]
2023-03-01 17:46:22 +01:00
fdf0875905 Pause sending queue when encountering a corrupt newsletter
[MAILPOET-4983]
2023-03-01 17:46:22 +01:00
93110826e7 Log when processing the queue for corrupt newsletter
[MAILPOET-4983]
2023-03-01 17:46:22 +01:00
976c374cb7 Catch exception when processing coupon block throws
When processing coupon block throws, the exception is
caught, custom exception is thrown and the newsletter status
is updated

[MAILPOET-4983]
2023-03-01 17:46:22 +01:00
51db625911 Add test for loggin when WC is not active
[MAILPOET-4983]
2023-03-01 17:46:22 +01:00
2a6b7cd210 Log WC is inactive when trying to generate coupon
[MAILPOET-4983]
2023-03-01 17:46:22 +01:00
fa73c3bc26 Order subjects by automation_run_id and id
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
286cd94135 Remove subject_keys from Step definition and load information from registry
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
e7d9f3d362 Remove unnecessary check.
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
2187f4a2d0 Use DISTINCT in count method
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
1ddf69b490 Move delete metas in if clause
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
4a49143422 Add primary key to automation_run_subjects table
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
b5eaf6d115 Rename hash method to getHash
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
6012a139cb Improve name of counting method
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
c68fc1378c Improve name of "run only once" meta
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
a96d2388f4 Use serialize for the hash generation
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
c847f69e9d Remove unnecessary brackets
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
dd3b37aba8 Improve names for all meta methods
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
8d41b5521c Fix typo
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
cf6f4f204d Use array_values for filtered subjects
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
da5f5b0b90 Improve formatting
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
1db97d2301 Simplify getting run ids
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
936de6ec30 Prevent calling toArray() twice
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
1b17c04301 Update templates to run only once
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
67f6b490bf Allow setting meta values in the templates
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
2ef6c8c9b2 Use new Automation data factory in other tests
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
83599e7ba9 Fix test to account for subject_keys and meta
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
e7868f033d Set existing automations to run only once
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
c733e088c2 Add test for run once setting
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
93cfffe295 Allow sending an email multiple times
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
fcf6e738c7 Interrupt automation run creation if a run already exists and only_once setting is set
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
38e7346b6e Show setting only in combination with correct triggers
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
7210fad0e1 Add subject_keys to Step definition
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
9e016bfc07 Add hash to Subject
The hash gives us a new column in our table, which we can
use to query a specific combination of args and key more
efficient

[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
230c9f183d Add setting to run the automation only once per subscriber
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
741d86d7ea Add action to update meta data
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
2d709b6249 Extend AutomationPutEndpoint to receive meta data
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
0d888ce8e4 Make meta data available in editor
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
7b788387fe Render automation sidebar dynamically
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
48e2c5f945 Add filter to decide whether an automation run should be created
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
60541209ff Test full validation method in Automation
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
63141bca95 Test the automation comparison method
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
8cfb93a3b6 Add meta data to Automation
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
cd9bf9107f Move createAutomationRun method to integration tester
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
7379b83a92 Move createAutomation method to integration tester
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
c4faa53386 Store run subjects in extra table
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
d406e7c05e Complete the test and update xk6-binary file to the latest
[MAILPOET-4956]
2023-02-28 14:47:52 +01:00
14e2fcfef3 Add first part of the k6 test adding a subscriber
[MAILPOET-4956]
2023-02-28 14:47:52 +01:00
cf2cdde7e5 Release 4.7.1 2023-02-28 14:44:48 +01:00
518918b675 Change pending approval notice from error to warning
[MAILPOET-4528]
2023-02-27 11:59:05 +01:00
986ce4bb30 Remove duplicated class name
[MAILPOET-4528]
2023-02-27 11:59:05 +01:00
612500c612 Change the value of option name constant
[MAILPOET-4528]
2023-02-27 11:59:05 +01:00
22b0278003 Add notice when the subscription is waiting on approval
[MAILPOET-4528]
2023-02-27 11:59:05 +01:00
3d0c3cbed9 Change used classes for pending approval message
[MAILPOET-4528]
2023-02-27 11:59:05 +01:00
fce2c5e45e Change message for pending approval
[MAILPOET-4528]
2023-02-27 11:59:05 +01:00
82e917f3f5 Fix warning about missing key from Reach
[MAILPOET-4528]
2023-02-27 11:59:05 +01:00
93ae658f5c Add link to settings on congratulatory page
[MAILPOET-4640]
2023-02-27 11:00:02 +01:00
da3ec8c9a8 Fix getting max subscriber id
[MAILPOET-5084]
2023-02-27 09:37:43 +01:00
8221b03466 Add test for getting max subscriber id
[MAILPOET-5084]
2023-02-27 09:37:43 +01:00
997a486f4a Remove unnecessary escaping of links in upgrade page
The links are already escaped by the Twig library. The additional escaping
makes messes up the query parameters.
I tested the escaping by trying adding XSS to the href and it was properly escaped
https://account.mailpoet.com/orders/upgrade/&quot;&gt;&lt;script&gt;alert(&quot;XSS&quot;)&lt;/script&gt;&lt;
even without the explicit twig escape filter call

[MAILPOET-5081]
2023-02-26 16:35:02 +01:00
da05dd3384 Use partial key upgrade URL in the upgrade page
[MAILPOET-5081]
2023-02-26 16:35:02 +01:00
56ecef06a2 Use upgrade link on upgrade page when user has valid key
[MAILPOET-5081]
2023-02-26 16:35:02 +01:00
71886776ae Hide start for free section from upgrade page when user already has a plan
[MAILPOET-5081]
2023-02-26 16:35:02 +01:00
20b48d5a1b Remove referral id from links from the upgrade page
We no longer use the feature and we plan to remove the code.
In this commit I'm removing the code before I do further changes.
[MAILPOET-5081]
2023-02-26 16:35:02 +01:00
8c0854ab47 Consider image src when calculating campaignIds
MAILPOET-5034
2023-02-26 15:20:48 +01:00
49c85c05ed Move campaignId generation to more logical place
MAILPOET-5034
2023-02-26 15:20:48 +01:00
a6824cce36 Add tests for campaignId generation
[MAILPOET-5033]
2023-02-26 15:20:48 +01:00
1a04b05e0d Add sending queue tests
[MAILPOET-5033]
2023-02-26 15:20:48 +01:00
fc8436ba74 Provide campaignId to sending methods via meta
[MAILPOET-5033]
2023-02-26 15:20:48 +01:00
0435c09c53 Calculate and store campaign IDs on sending queues
[MAILPOET-5033]
2023-02-26 15:20:48 +01:00
64137aebb3 Update coupon fields, add new defaults
MAILPOET-4764
2023-02-23 16:59:15 +01:00
9578e4c11e Add Coupon block to Wine City Newsletter template
MAILPOET-4764
2023-02-23 16:59:15 +01:00
62e90c3e19 Add Coupon block to Abandoned Cart – Fitness Newsletter template
MAILPOET-4764
2023-02-23 16:59:15 +01:00
f01429fe52 Add Coupon block to Avocado Newsletter template
MAILPOET-4764
2023-02-23 16:59:15 +01:00
14046affd7 Add Coupon block to Book store Newsletter template
MAILPOET-4764
2023-02-23 16:59:15 +01:00
526e631f6e Add Coupon block to Flowers Newsletter template
MAILPOET-4764
2023-02-23 16:59:15 +01:00
3b9cbbfc61 Remove Coupon block feature flag
MAILPOET-4978
2023-02-23 16:59:15 +01:00
87e5ea8dfd Add filter for PHPMailer instance into SMTP mailer method
[MAILPOET-5064]
2023-02-23 16:45:39 +01:00
26bdf7e20c Fix PHPStan errors in the data factories classes
[MAILPOET-4037]
2023-02-23 14:13:17 +01:00
a9a3c53245 Fix PHPStan errors in the acceptance tests
[MAILPOET-4037]
2023-02-23 14:13:17 +01:00
678911a8bc Fix PHPStan baseline errors in a few integration test files
[MAILPOET-4037]
2023-02-23 14:13:17 +01:00
2bcd1ace70 Fix PHPStan errors in tests/integration/Segments/DynamicSegments/
[MAILPOET-4037]
2023-02-23 14:13:17 +01:00
6374ce9ad3 Remove unused parameter from getSubscribersCount() to fix a PHPStan error
[MAILPOET-4037]
2023-02-23 14:13:17 +01:00
775ab32037 Fix PHPStan baseline errors in a few test files
[MAILPOET-4037]
2023-02-23 14:13:17 +01:00
e942133ac6 Update test functions and remove eslint disable no shadow
[MAILPOET-4955]
2023-02-23 13:16:17 +01:00
5ef9608366 Update tests and config
[MAILPOET-4955]
2023-02-23 13:16:17 +01:00
ede0a1e4cd Change admin password back
[MAILPOET-4955]
2023-02-23 13:16:17 +01:00
bc699ea642 Add subscribers filtering by status test
[MAILPOET-4955]
2023-02-23 13:16:17 +01:00
27045209bc Update config, scenarios, readme and the test
[MAILPOET-4955]
2023-02-23 13:16:17 +01:00
ee007e9392 Refactor fetching subscribers stats data
In the original approach we completely ignored subscribers who subscribed and unsubscribed
within the last 30 days.
Based on the feedback from QA this was quite confusing.
This commit changes the logic and instead of looking at current status we fetch the counts
based on logs (the lastSubscribedAt column and statistics_unsubscribes table) and we ignore the current status.
On the list level we don't have any logs so we still need to check the current status on the list level,
but newly we ignore the global status.
[MAILPOET-4828]
2023-02-22 13:54:31 +01:00
b1ec1b9500 Add helper method for updating updatedAt of an entity in integration tests
We can't simply set updatedAt via setter on the entity. The value gets overwritten
in the TimeStampListener. This commit adds a simple method that saves updatedAt via
dbal connection and refreshes the entity.
[MAILPOET-4828]
2023-02-22 13:54:31 +01:00
a7c8a8c638 Add links for empty states of subscribers stats to allow open in new tab
[MAILPOET-4828]
2023-02-22 13:54:31 +01:00
9e157da66d Improve list level unsubscribe stats
We want to show admin how many subscribers subscribed to a list and how many
unsubscribed within last 30 days so that they see the change.
If someone subscribed and also unsubscribed within those 30 days we skip him.
We don't have data to detect they were really subscribed at some point.
[MAILPOET-4828]
2023-02-22 13:54:31 +01:00
e3897fa04e Improve global unsubscribes stats on homepage
Before this fix if a subscriber subscribed multiple times
we counted them a multiple global unsubscribes
[MAILPOET-4828]
2023-02-22 13:54:31 +01:00
f1ac576a7a Refactor homepage code - prefer expression over ternary operator
[MAILPOET-4828]
2023-02-22 13:54:31 +01:00
ec74290b3e Add missing key property for the list of lists
[MAILPOET-4828]
2023-02-22 13:54:31 +01:00
bcb3bacf89 Add description of what subscriber stats values represent
[MAILPOET-4828]
2023-02-22 13:54:31 +01:00
566882ad44 Add acceptance test for subscribers stats section on the homepage
[MAILPOET-4828]
2023-02-22 13:54:31 +01:00
c7238441e2 Add styles for small screens for subscriber stats
[MAILPOET-4828]
2023-02-22 13:54:31 +01:00
aa4d58fb58 Add styles for subscribers stats section
[MAILPOET-4828]
2023-02-22 13:54:31 +01:00
719e0095a7 Add global subscribers stats change info to UI
[MAILPOET-4828]
2023-02-22 13:54:31 +01:00
04307ca2a6 Compute change of global subscribed subscribers
[MAILPOET-4828]
2023-02-22 13:54:31 +01:00
6e99d5ec9d Add empty states for homepage subscribers stats section
[MAILPOET-4828]
2023-02-22 13:54:31 +01:00
076f79358e Add engagement score to the homepage subscribers stats
[MAILPOET-4828]
2023-02-22 13:54:31 +01:00
50a377b749 Render list change info in subscribers stats section on homepage
[MAILPOET-4828]
2023-02-22 13:54:31 +01:00
1727163640 Add fetching of list level subscriber changes to homepage data service
[MAILPOET-4828]
2023-02-22 13:54:31 +01:00
f6d58dab8f Display global subscriber stats in the homepage UI
[MAILPOET-4828]
2023-02-22 13:54:31 +01:00
ab35f5c8c1 Add fetching of global subscribers stats to Homepage data controller
[MAILPOET-4828]
2023-02-22 13:54:31 +01:00
9217f197f9 Add subscribers section description
[MAILPOET-4828]
2023-02-22 13:54:31 +01:00
16beb8d0f3 Add empty subscribers stats section to homepage
[MAILPOET-4828]
2023-02-22 13:54:31 +01:00
673f6db39a Fix spacing in block settings
After the initial change for the new coupon block was necessary to fix overlooked issues.
[MAILPOET-4890]
2023-02-22 13:07:40 +01:00
f28687be74 Remove redundant classes
[MAILPOET-4890]
2023-02-22 13:07:40 +01:00
71415e73c0 Create common types for callbacks
[MAILPOET-4890]
2023-02-22 13:07:40 +01:00
7930f04b22 Add default values
Because React components throw errors when the initial value is null or undefined before the change.
I added default values for all inputs.
[MAILPOET-4890]
2023-02-22 13:07:40 +01:00
12456828fe Fix mapping products and categories for new coupon
[MAILPOET-4890]
2023-02-22 13:07:40 +01:00
bd95f9caaf Remove settings coupon block test
Because the new settings panel was refactored to React. It is not possible to use this test anymore.
[MAILPOET-4890]
2023-02-22 13:07:40 +01:00
767e6f4fbf Fix renamed coupon block attributes
[MAILPOET-4890]
2023-02-22 13:07:40 +01:00
59ab4d742e Add validation improvements to coupon settings
[MAILPOET-4890]
2023-02-22 13:07:40 +01:00
92eb91001a Unify design with other blocks
[MAILPOET-4890]
2023-02-22 13:07:40 +01:00
3938c40023 Make display options hideable
[MAILPOET-4890]
2023-02-22 13:07:40 +01:00
8beb423a43 Add reseting code when tab is changed
[MAILPOET-4890]
2023-02-22 13:07:40 +01:00
847132b433 Create new component for existing coupons
[MAILPOET-4890]
2023-02-22 13:07:40 +01:00
64c2ab5f9f Create component for usage limits
[MAILPOET-4890]
2023-02-22 13:07:40 +01:00
45d4af878b Add validation for email restrictions
[MAILPOET-4890]
2023-02-22 13:07:40 +01:00
ac9eddc239 Move email restrictions to React component
[MAILPOET-4890]
2023-02-22 13:07:40 +01:00
57ca1bf864 Move category selections to React component
[MAILPOET-4890]
2023-02-22 13:07:40 +01:00
7b93f0e61e Move products selections to React component
[MAILPOET-4890]
2023-02-22 13:07:40 +01:00
9a7c14076a Create usage restriction component
[MAILPOET-4890]
2023-02-22 13:07:40 +01:00
436e4e01e1 Rename component
[MAILPOET-4890]
2023-02-22 13:07:40 +01:00
25430762e8 Make general panel switchable
[MAILPOET-4890]
2023-02-22 13:07:40 +01:00
6449505696 Add coupon settings component
[MAILPOET-4890]
2023-02-22 13:07:40 +01:00
d25e6cf4ff Use React for coupon general settings
[MAILPOET-4890]
2023-02-22 13:07:40 +01:00
456b99fa02 Use React for coupon source switch
[MAILPOET-4890]
2023-02-22 13:07:40 +01:00
6fdb1247a7 Move margin to lower level
[MAILPOET-4890]
2023-02-22 13:07:40 +01:00
e4b3717012 Use merge_method parameter for automated merging
[MAILPOET-3987]
2023-02-21 15:58:19 +01:00
506f07ce36 Use merge command in release:publish
[MAILPOET-3987]
2023-02-21 15:58:19 +01:00
f4d8c7acd8 Add command for merge pull request
[MAILPOET-3987]
2023-02-21 15:58:19 +01:00
5e5a165a41 Add method for merge pull request by branch
[MAILPOET-3987]
2023-02-21 15:58:19 +01:00
8889a3f63d Release 4.7.0 2023-02-21 14:25:14 +01:00
67455a0752 Bump WC requires at least to L - 2
[MAILPOET-4783]
2023-02-20 12:26:20 +01:00
7ca607f49f Update WC tested up to version
[MAILPOET-4783]
2023-02-20 12:26:20 +01:00
b3aff28335 Acceptance: wait for page elements to load before asserting
[MAILPOET-4783]
2023-02-20 12:26:20 +01:00
489fa9552b Acceptance: prioritize assertion with delay over immediate one
First checking for the delayed assertion and then running the
immediate one reduces the chance of flakiness

[MAILPOET-4783]
2023-02-20 12:26:20 +01:00
d49040a11e Accept: verify form is not loading when checking for select2
[MAILPOET-4783]
2023-02-20 12:26:20 +01:00
64f008e106 Acceptance: increase timeout for ever failing test
The increased timeout helped to get the test green on local

[MAILPOET-4783]
2023-02-20 12:26:20 +01:00
2f0d7137db Acceptance: wait for element to appear then try to clear it
[MAILPOET-4783]
2023-02-20 12:26:20 +01:00
68bd3314d9 Make automation acceptance test css selectors more specific
Less specific css selectors + css grid orders were making the
acceptance tests flaky

[MAILPOET-4783]
2023-02-20 12:26:20 +01:00
2083adc3d2 Make sure we call initializeMixpanelWhenLoaded when window.MailPoet is defined
The initializeMixpanelWhenLoaded expects window.MailPoet to be defined.
Instead of calling initializeMixpanelWhenLoaded as a side-effect of the import
we can export the function and make sure it is called after window.MailPoet is defined.
[MAILPOET-5065]
2023-02-20 11:34:09 +01:00
a4e8bf9a9c Update tests and add test for ab test button
MAILPOET-4972
2023-02-20 11:10:46 +01:00
7daa0c9dff Prevent redirecting on Experimental Page
MAILPOET-4972
2023-02-20 11:10:46 +01:00
027f3fbefe Setup ab test experiment debugger
MAILPOET-4972
2023-02-20 11:10:46 +01:00
e3c4728529 Save event data in storage pending when analytics permission is available.
We are reusing the `MailPoetTrackEvent` method because we overwrite the `MailPoet.trackEvent` method when mixpanel is loaded.

Unfortunately, mixpanel being available does not mean MailPoet has permission to track user events. We are saving the tracking data for when the permission becomes available.

MAILPOET-4972
2023-02-20 11:10:46 +01:00
06f231f4b1 Add an A/B test button component and setup basic events.
We are using the `@marvelapp/react-ab-test` package because the original `react-ab-test` package hasn't received an update in a while

MAILPOET-4972
2023-02-20 11:10:46 +01:00
4966d45d5e Update copy of the MailPoet link added to the WooCommerce task list
[MAILPOET-5063]
2023-02-19 11:24:52 +01:00
ae38774f85 Remove checking closed panel
For some reason, the click doesn't work properly when the mouse moves too fast away.
Because we don't check closing of the panel in another test I decided to remove it from this test too.
[MAILPOET-5060]
2023-02-17 07:36:42 +02:00
b907ca491b Fix TinyMCE prefixing
[MAILPOET-5052]
2023-02-16 10:50:47 +01:00
abfc33002c Make form close buttons focusable/usable with keyboard
[MAILPOET-4877]
2023-02-16 10:17:50 +01:00
94954c1601 Update Docker image for oldest acceptance tests to use WP 5.9
[MAILPOET-4893]
2023-02-15 13:21:45 +01:00
914b5752cd Upgrade minimum required WordPress version to 5.9
[MAILPOET-4893]
2023-02-15 13:21:45 +01:00
102da43d05 Add escaping of form name when printed in the old notification system
[MAILPOET-5056]
2023-02-15 12:55:02 +01:00
6cf9f7f1d6 Add link to form editor to the corrupted form data message
[MAILPOET-5056]
2023-02-15 12:55:02 +01:00
389017c3b9 Display an error notice when a form with malformed settings data is detected
[MAILPOET-5056]
2023-02-15 12:55:02 +01:00
0b4d18faa0 Prevent form listing crash when a form is missing settings data
[MAILPOET-5056]
2023-02-15 12:55:02 +01:00
623010a644 Use dataprovider and clean up early
[MAILPOET-4883]
2023-02-15 12:30:41 +01:00
9e62501c30 Update comment
[MAILPOET-4883]
2023-02-15 12:30:41 +01:00
95ec3d2fb9 Add integration test to ensure posts are probperly fetched
[MAILPEOT-4883]
2023-02-15 12:30:41 +01:00
f60ae7a8ef Set dynamic also correctly for products
[MAILPOET-4883]
2023-02-15 12:30:41 +01:00
eef47c5bfb Use small mixin breakpoint
[MAILPOET-4830]
2023-02-15 12:19:35 +01:00
a91108f52e Use more optimized image
[MAILPOET-4830]
2023-02-15 12:19:35 +01:00
f0772cc793 Add acceptance test for homepage upsell
[MAILPOET-4830]
2023-02-15 12:19:35 +01:00
fe20687ae8 Add batch method for creating subscribers
[MAILPOET-4830]
2023-02-15 12:19:35 +01:00
da5051f758 Add purchase URL to upsell
[MAILPOET-4830]
2023-02-15 12:19:35 +01:00
a9d8a2b164 Add condition for displaying
[MAILPOET-4830]
2023-02-15 12:19:35 +01:00
c6846a2d4c Make close button optional
[MAILPOET-4830]
2023-02-15 12:19:35 +01:00
81ffe6e4f9 Add styles for upsell component
[MAILPOET-4830]
2023-02-15 12:19:35 +01:00
ab3d27569f Make upsell component closable
[MAILPOET-4830]
2023-02-15 12:19:35 +01:00
337dcb603f Add homepage upsell component
[MAILPOET-4830]
2023-02-15 12:19:35 +01:00
084022010b Release 4.6.2 2023-02-14 15:15:17 +01:00
b83dac2ed9 Use setting types instead of inline types when setting tracking settings
[MAILPOET-5059]
2023-02-14 12:46:04 +01:00
ddf4c9109c Use the value of YesNo component directly as it is already boolean
[MAILPOET-5059]
2023-02-14 12:46:04 +01:00
40cdb9a766 Fix tracking settings configuration on WooCommerce setup wizard step
When testing the woo wizard step i noticed that always set tracking to
'partial' even if the checkbox is checked. When debugging I found that the allowed value
is not a string but boolean. I tested this in wizard and also on the WooCommerce setup page.
I needed to update the acceptance test because it was clicking on 'no' and asserting the outcome as 'yes' was clicked.
[MAILPOET-5059]
2023-02-14 12:46:04 +01:00
9cf70c6c3b Sync WooCommerce settings from Woo step in wizard to store
[MAILPOET-5059]
2023-02-14 12:46:04 +01:00
333b121b2a Update store when saving tracking preferences in wizard
[MAILPOET-5059]
2023-02-14 12:46:04 +01:00
1de328abaa Use settings store instead of local component state for sender data
In [MAILPOET-4818], we started using the settings Redux store to handle
adding the MSS key in the last step of the Welcome Wizard. This
introduced a bug in the previous steps as the same Redux store is not
used. Those steps rely on the component state to track changes to their
fields. This meant that once the user completed the last step, the
changes made in the previous steps were ignored and the default values
for the settings was saved to the database.

This commit fixes this bug for the first step of the wizard by using the
same settings Redux store to track changes to the sender name and
address.

[MAILPOET-5059]
2023-02-14 12:46:04 +01:00
6b4b1dfcbe Add basic acceptance test for the welcome wizard
[MAILPOET-5051]
2023-02-14 12:46:04 +01:00
66dc6e67ab Remove unnecessary override
[MAILPOET-4872]
2023-02-13 14:13:44 -03:00
d8d859d209 Declare properties to avoid dynamic usage in codeception
[MAILPOET-4872]
2023-02-13 14:13:44 -03:00
4bd7dd4ad6 Fix codeception PHP 8.2 deprecation notices
[MAILPOET-4872]
2023-02-13 14:13:44 -03:00
359f134881 Fix merge conflict after rebasing trunk
[MAILPOET-4633]
2023-02-13 16:56:54 +01:00
a65866d2a8 Use refreshMSSKeyStatus in preview modal to refresh key status
[MAILPOET-4633]
2023-02-13 16:56:54 +01:00
3917a559f7 Make a direct call to endpoint to update key pending status
[MAILPOET-4633]
2023-02-13 16:56:54 +01:00
24eab9aac3 Refrain from initializing settings store on send page
[MAILPOET-4633]
2023-02-13 16:56:54 +01:00
bb240d8e68 Improve call_api return typings
[MAILPOET-4633]
2023-02-13 16:56:54 +01:00
f3bf4b36e9 Introduce endpoint to refresh mss key status
[MAILPOET-4633]
2023-02-13 16:56:54 +01:00
d8729ef43c Show errors happening when refreshing mss key status
[MAILPOET-4633]
2023-02-13 16:56:54 +01:00
4072daa91f Fix failing acceptance test due to change of string
[MAILPOET-4633]
2023-02-13 16:56:54 +01:00
3ae281fc1f Add functionality to refresh mss key status in preview modal
[MAILPOET-4633]
2023-02-13 16:56:54 +01:00
86ce19085a Fix failing test by ensuring mssKey is approved
If the mssKey is pending approval the activate button
of welcome newsletters stays disabled

[MAILPOET-4633]
2023-02-13 16:56:54 +01:00
0aceab5a2e Add pending approval message and functionality to send page
Show a message to user about their pending approval and
allow them to update the status in place via ajax

[MAILPOET-4633]
2023-02-13 16:56:54 +01:00
a48b725c7d Define pending newsletter message component
[MAILPOET-4633]
2023-02-13 16:56:54 +01:00
cf5718122f Fix the issue with verifyMssKey overriding is_approved
The verifyMssKey side effect handler was overriding the value
of is_approved when updating the state.

[MAILPOET-4633]
2023-02-13 16:56:54 +01:00
e7e4276bf2 Fix the issue with failing to set a truthy value correctly
is_approved was (sometimes) set to string false, which was
causing the js logic to fail

[MAILPOET-4633]
2023-02-13 16:56:54 +01:00
551d68ff69 Convert sent.tsx to jsx
[MAILPOET-4633]
2023-02-13 16:56:54 +01:00
61fa215607 Extend the pending approval message on settings/premium
The message is extended with a link to re-verify the key
and update the status

[MAILPOET-4633]
2023-02-13 16:56:54 +01:00
89df50c160 Always skip unknown migrations (not only completed ones)
[MAILPOET-5054]
2023-02-13 16:56:01 +01:00
e9326e8c9e Handle a case when migrations table contains invalid data
See: https://wordpress.org/support/topic/null-values-are-exported-as-empty-strings/

[MAILPOET-5054]
2023-02-13 16:56:01 +01:00
956d693454 Skip redirecting to MailPoet landing page when activated from WooCommerce setup wizard
MAILPOET-5058
2023-02-13 16:23:59 +01:00
a76fb6c63a Update form template "Relax" definition to display correctly
The popup and slide-in forms should not display email input and submit button in columns.
[MAILPOET-5047]
2023-02-13 12:14:05 +01:00
d061d451a4 Remove Export from Main menu options
MAILPOET-5045
2023-02-13 11:58:58 +01:00
52e19d445a Update pnpm to the latest version
[MAILPOET-5055]
2023-02-09 09:57:30 +02:00
c6a3e08c34 Fix soundasleep/html2text PHP 8.2 deprecation notices
[MAILPOET-4875]
2023-02-08 15:26:14 +01:00
a11a462eee Fix gregwar/captcha PHP 8.2 deprecation notices
[MAILPOET-4874]
2023-02-08 15:26:14 +01:00
310d689219 Ensure image reloads in safari
Safari does not reload the image when only the hash
changes. Therefore we use the cachebust get parameter
like we do already for the audio

[MAILPOET-5032]
2023-02-08 13:08:09 +01:00
118cc83cc2 Remove 'Click to refresh' in title because a click does no longer refresh
[MAILPOET-5032]
2023-02-08 13:08:09 +01:00
3da2144ead Extend audio type by range header
[MAILPOET-5032]
2023-02-08 13:08:09 +01:00
b17a9cb4ae Add test to ensure HTTP_RANGE headers do not reload captcha
[MAILPOET-5032]
2023-02-08 13:08:09 +01:00
351c8a0bd7 Remove the s and g parameters from the shop URL
Those parameters are not working as expected (see
https://github.com/mailpoet/mailpoet/pull/4650#issuecomment-1410881945
for more details). So we are removing them for now and they will be
added again on a separate ticket in the future
(https://mailpoet.atlassian.net/browse/MAILPOET-5046).

[MAILPOET-4818]
2023-02-08 12:56:32 +01:00
c705862e82 Use MailPoet module properties instead of the window object
We want to stop accessing window directly in JS code (see
https://mailpoet.atlassian.net/browse/MAILPOET-2943). So this commit
uses MailPoet module properties instead of accessing
window.mailpoet_mail_function_enabled and window.subscribers_count
directly.

[MAILPOET-4818]
2023-02-08 12:56:32 +01:00
dd2f100acd Implement MSS key verification in the MSS step of the welcome wizard
[MAILPOET-4818]
2023-02-08 12:56:32 +01:00
88398af343 Remove unused translatable strings
Back in 2020, commit bf13d08a22 removed the code that
used those strings but the strings themselves were never removed.

[MAILPOET-4818]
2023-02-08 12:56:32 +01:00
28bc4d6943 Display the MSS step of the wizard when there is a MSS key set
Before we used to hide the MSS step of the welcome wizard when there was
already a key set. This commit stops this behavior and now we will
always display the MSS step as it will start allowing users to set the
MSS key in it.

[MAILPOET-4818]
2023-02-08 12:56:32 +01:00
e1e690ad14 Refactor input and button to validate key to its own components
This commit refactors the <input> and <button> used to validate the MSS
key to its own components. After doing this, we will be able to reuse
this components outside of the settings app. In particular, we want to
be able to use it in the welcome wizard app.

It also implements one small change to the verify button that is part of
the changes related to the welcome wizard. Now the verify button is
disabled when the MSS key <input> is empty.

[MAILPOET-4818]
2023-02-08 12:56:32 +01:00
110b67bd9c Refactor key activation messages to be reused in the welcome wizard
[MAILPOET-4818]
2023-02-08 12:56:32 +01:00
8788e299e1 Extract updateSettings() and finishWizard to refrain from passing it down
[MAILPOET-4818]
2023-02-08 12:56:32 +01:00
ed81ae1ccd Simplify code by accessing subscriber count directly
Instead of passing it down the component chain.

[MAILPOET-4818]
2023-02-08 12:56:32 +01:00
d19e297d37 Refactor code to its own function outside component
Doing this to avoid redefining the function on each render and to
improve readability since a named function was used.

[MAILPOET-4818]
2023-02-08 12:56:32 +01:00
c4ce4fd10b Simplify imports by adding an index to common/typography/
Doing this based on feedback from first draft version of the PR related
to this commit.

[MAILPOET-4818]
2023-02-08 12:56:32 +01:00
527ebafc5c Use React Router to navigate between different parts of the MSS step
This replaces the first implementation that was just a temporary
implementation using the component state.

[MAILPOET-4818]
2023-02-08 12:56:32 +01:00
e7f1325d3e Add tracking parameters to account.mailpoet.com links in the MSS step
[MAILPOET-4818]
2023-02-08 12:56:32 +01:00
d7d3095824 Use icon for the list in the MSS step of the welcome wizard
It seems the <List> component doesn't accept a className parameter and
that is why I added a <div> around it.

[MAILPOET-4818]
2023-02-08 12:56:32 +01:00
d9b103891b Fix style of the links in the MSS step of the welcome wizard
[MAILPOET-4818]
2023-02-08 12:56:32 +01:00
fe8f90a4d8 Display OwnEmailServiceNote component on the second part of the MSS step
Before this component was displayed only on the first part of the MSS
step.

[MAILPOET-4818]
2023-02-08 12:56:32 +01:00
6d7bece8d6 Implement functionality of the third part of the MSS step
Finish the wizard when the user clicks on the finish button.

[MAILPOET-4818]
2023-02-08 12:56:32 +01:00
199f3e21e7 Implement temporary solution to move between the parts of this step
The solution will likely change in subsequent commits to use something
that chnages the URL as well so that users can reload the page when
displaying one of the parts.

[MAILPOET-4818]
2023-02-08 12:56:32 +01:00
7e9caeffbf Implement design and content of the third part of the MSS step
This commit implements the design and content of the third part of the
MSS step in the welcome wizard. This is a new part of the final step.
The functionality is not yet implemented and will be in a subsequent
commit.

[MAILPOET-4818]
2023-02-08 12:56:32 +01:00
a075b7bd68 Implement design and content of the second part of the MSS step
This commit implements the design and content of the second part of the
MSS step in the welcome wizard. This is a new part of the final step.
The functionality is not yet implemented and will be in a subsequent
commit.

The contents of the first part that already existed were moved to its
own file (first_part.tsx) as part of this commit as well.

[MAILPOET-4818]
2023-02-08 12:56:32 +01:00
359f734024 Implement confirmation modal for setting up custom sending service
This commit implements the confirmation modal that is displayed when the
user clicks on the "I’ll set up my own email service" link in the MSS
step of the welcome wizard.

[MAILPOET-4818]
2023-02-08 12:56:32 +01:00
a069ae6884 Update strings in the MSS step of the welcome wizard
This commit implements the changes to the strings of the MSS step of the
welcome wizard. The new functionality is still missing and will be
implemented in upcoming commits.

[MAILPOET-4818]
2023-02-08 12:56:32 +01:00
6de8b0ceec Use different elements for success_pitch_mss.tsx and pitch_mss_step.tsx
Up until now success_pitch_mss.tsx and pitch_mss_step.tsx shared code
(mostly strings), but this will change in subsequent commits as part of
ticket MAILPOET-4818. So this commit copies shared code from
pitch_mss_step.tsx to success_pitch_mss.tsx. So that future changes in
one file we won't affect the other.

[MAILPOET-4818]
2023-02-08 12:56:32 +01:00
edf34ccc2c Refactor pitch_mss_step.jsx to TSX
[MAILPOET-4818]
2023-02-08 12:56:32 +01:00
57f953933d Release 4.6.1 2023-02-07 09:19:18 -06:00
9b2e6208e0 Allow editors to manage automations
[MAILPOET-5024]
2023-02-06 14:06:06 +01:00
314327aed2 Add tests to ensure editor has access to endpoints
[MAILPOET-5024]
2023-02-06 14:06:06 +01:00
ce370c76a3 Fix cut-off placeholder in multi-select select2
[MAILPOET-4630]
2023-02-06 13:57:48 +01:00
153d29b167 Change height of select2 with single value to be the same as regular input
[MAILPOET-4630]
2023-02-06 13:57:48 +01:00
7858d4ada2 Link to the new homepage from the MailPoet task in WooCommerce
MAILPOET-4926
2023-02-06 13:38:33 +01:00
adc158367d Add wait and retry when translations API returns 429
[MAILPOET-4979]
2023-02-06 12:27:39 +01:00
69e67f3c7a Do not cache language packs response when code is not 200
[MAILPOET-4979]
2023-02-06 12:27:39 +01:00
4f831f8b17 Refactor API call for fetching language packs data to private method
[MAILPOET-4979]
2023-02-06 12:27:39 +01:00
36c95f80fd Add transient caching of language packs data
[MAILPOET-4979]
2023-02-06 12:27:39 +01:00
2fb36e57f9 Stop tracking "User has clicked a tab in Settings" event to Mixpanel
[MAILPOET-5031]
2023-02-06 12:22:06 +01:00
401501b97b Use @ts-expect-error
[MAILPOET-3523]
2023-02-06 12:19:21 +01:00
d585c27f6e Convert map_form_data_before_saving.spec.js
[MAILPOET-3523]
2023-02-06 12:19:21 +01:00
0775ce2669 Convert map_form_data_after_loading.spec.js
[MAILPOET-3523]
2023-02-06 12:19:21 +01:00
37bb5fd824 Convert form_validator.spec.js
[MAILPOET-3523]
2023-02-06 12:19:21 +01:00
fee5af2ffa Convert form_to_block_test_data.js
[MAILPOET-3523]
2023-02-06 12:19:21 +01:00
21d03c5bf7 Convert form_body_to_blocks.spec.js
[MAILPOET-3523]
2023-02-06 12:19:21 +01:00
0854b1ce36 Convert toggle_sidebar_panel.jsx
It also adds a new type for the action and converts the test.

[MAILPOET-3523]
2023-02-06 12:19:21 +01:00
949c962fc9 Convert create_custom_field_started.jsx
It also adds a new type for the action and converts the test.

[MAILPOET-3523]
2023-02-06 12:19:21 +01:00
17c0a76754 Rename Type
[MAILPOET-3523]
2023-02-06 12:19:21 +01:00
d449f02883 Add functions to use partial types in tests
Functions to create mocks with Partial Types in tests and avoid using `as Type`. Also extract FormData type to form_data_types.ts

[MAILPOET-3523]
2023-02-06 12:19:21 +01:00
b40c5a5dfe Convert history_record.ts.jsx to ts
Converts the file and test. It also moves HistorRecord type to state_types.ts

[MAILPOET-3523]
2023-02-06 12:19:21 +01:00
08aea80a55 Convert save_form_started.jsx to ts
Converts the file and test. It also removes extra param from tests.

[MAILPOET-3523]
2023-02-06 12:19:21 +01:00
86a4347908 Convert blocks_to_form_body.jsx to ts
Converts the file and tests. It also creates the type CustomFields.

[MAILPOET-3523]
2023-02-06 12:19:21 +01:00
f242e847bb Convert selectors.spec.js to ts
I have decided to use `as State` on the mocks instead of creating a big object conforming to the type.
The functions tested only use one or two properties of the 33 the type has and I have verified the properties we use for the test are well-formed.

[MAILPOET-3523]
2023-02-06 12:19:21 +01:00
3c89bf2f0d Remove currency from the Woo Tracker data
The currency is already tracked by Woo core under settings.currency.
[MAILPOET-5037]
2023-02-06 12:13:27 +01:00
10ea5ec55b Remove extra sending method check for new users.
mta.method is probably not set yet.

MAILPOET-4929
2023-02-06 12:11:12 +01:00
805804f3d3 Add WP Filter to disable the mail function check
MAILPOET-4929
2023-02-06 12:11:12 +01:00
74549665d6 Stop checking for DisabledMailFunction when the plugin is repeatedly activated and updated.
We will only perform the check when the plugin is first activated and sending method is changed.

MAILPOET-4929
2023-02-06 12:11:12 +01:00
5b78ea9a69 Update test mail information for DisabledMailFunctionNotice
In this commit, we change the test mail subject, body and destination address

MAILPOET-4929
2023-02-06 12:11:12 +01:00
b25c8b8965 Do not use title attribute when alt text is not defined
[MAILPOET-4932]
2023-02-06 11:43:23 +01:00
da5b0ede16 Show the MailPoet logo on the landing page
This will show the topbar (including the MailPoet logo) and set content max-width

MAILPOET-5029
2023-02-06 10:59:27 +01:00
29de3e2bae Remove Promise from helper
[MAILPOET-4960]
2023-02-02 17:16:33 +01:00
79bc684312 Add new test Settings basics
[MAILPOET-4960]
2023-02-02 17:16:33 +01:00
7bc71429eb Add Copy to clipboard button
[MAILPOET-4526]
2023-02-01 12:48:35 +01:00
967988519b Fix deprecated callable usage in Sudzy library
[MAILPOET-4873]
2023-02-01 12:17:03 +01:00
3b5a96a3f7 Add test case that coupon is rendered correctly
[MAILPOET-4984]
2023-02-01 11:21:49 +01:00
83b14013ec Add coupon block unit test
[MAILPOET-4984]
2023-02-01 11:21:49 +01:00
cd9904de7d Fix using code instead of couponCode read by id
[MAILPOET-4984]
2023-02-01 11:21:49 +01:00
d305498613 Add coupon block acceptance test
[MAILPOET-4984]
2023-02-01 11:21:49 +01:00
69833557e4 Add newsletter editor test for coupon block
[MAILPOET-4984]
2023-02-01 11:21:49 +01:00
cd596245ce Add coupon default values
[MAILPOET-4984]
2023-02-01 11:21:49 +01:00
7d36d59e65 Allow rgb in the newsletter style attributes
[MAILPOET-4981]
2023-02-01 11:10:59 +01:00
efaa5073fb Query subscriber by user in shortcode
[MAILPOET-4184]
2023-02-01 10:53:26 +01:00
37f4082210 Remove wpUser authentication
[MAILPOET-4184]
2023-02-01 10:53:26 +01:00
f324abd1d0 Update woocommerce-stubs to version 7.3.0
[MAILPOET-4313]
2023-02-01 08:57:47 +02:00
5d56a0368a Update outdated PHP version message
Changing the message to make it more clear that PHP >= 7.2 and <= 7.3 is
not recommended but still supported.

[MAILPOET-4933]
2023-01-31 13:58:52 +01:00
106db48f8d Display the PHP outdated version warning for sites running PHP <= 7.3
[MAILPOET-4933]
2023-01-31 13:58:52 +01:00
ed2ecb7604 Release 4.6.0 2023-01-31 13:26:57 +01:00
10dcc4f45d Fix failing test due to a changed DMARC policy
It seems that the DMARC policy for automattic.com was changed from
"quarantine" to "reject".

[MAILPOET-5038]
2023-01-30 14:40:17 -03:00
3237351450 Move code to handle tracking source of wizard to its own file
Doing this based on feedback during the PR review: https://github.com/mailpoet/mailpoet/pull/4660/files#r1073420154

[MAILPOET-4814]
2023-01-30 15:01:42 +01:00
8d57e81b99 Use return type hint instead of docblock to tell PHP the return type
[MAILPOET-4814]
2023-01-30 15:01:42 +01:00
e37daa6c66 Delete setting instead of updating it when tracking wizard source
[MAILPOET-4814]
2023-01-30 15:01:42 +01:00
ad4247a241 Add API endpoint to delete a setting
[MAILPOET-4814]
2023-01-30 15:01:42 +01:00
8a4f5c13da Add tracking for users arriving to the wizard from WooCommerce
MailPoet adds a link to the WooCommerce task list pointing to its own
welcome wizard. We want to track users that arrive to the MP wizard from
WooCommerce but at this point tracking is not enabled. So we store the
information in a setting, and send the tracking event to Mixpanel, if it
is enabled, after the user completes the wizard.

[MAILPOET-4814]
2023-01-30 15:01:42 +01:00
1161e6f3f6 Add MailPoet task to WooCommerce homepage
[MAILPOET-4814]
2023-01-30 15:01:42 +01:00
e5d5e20efd Add escaping into rendering homepage_link shortcode
[MAILPOET-4936]
2023-01-30 14:39:35 +01:00
9fcb9afa9d Add site:homepage_url shortcode to helper
[MAILPOET-4936]
2023-01-30 14:39:35 +01:00
b24b7b86fd Update homepage link in default settings for confirmation email
[MAILPOET-4936]
2023-01-30 14:39:35 +01:00
ddca94891d Unify rendering site:homepate_link shortcode with value from helper
[MAILPOET-4936]
2023-01-30 14:39:35 +01:00
9f14f3cc08 Change inserted text in shortcode helper for Homepage link
[MAILPOET-4936]
2023-01-30 14:39:35 +01:00
6b3fc309cc Add new shortcode [site:homepage_url]
[MAILPOET-4936]
2023-01-30 14:39:35 +01:00
60d933b39a Fix capitalization of MSS
[MAILPOET-5030]
2023-01-30 14:25:41 +01:00
ea57fd9c11 Update pronouns in a string from "his/her" to "their"
[MAILPOET-5028]
2023-01-30 14:24:21 +01:00
a9788b04d4 Remove Code Sniffer ignore
[MAILPOET-4900]
2023-01-30 14:13:33 +01:00
46c45d9bef Fix consolidation/robo PHP 8.2 deprecation notices
[MAILPOET-4900]

When a new robo version with a fix for 'self' in callables is released,
this patch can be removed. Check here:
https://github.com/consolidation/robo/issues/1135
2023-01-30 14:13:33 +01:00
3282e2f063 Update robo and its dependency to PHP 8.2 compatible versions
[MAILPOET-4900]
2023-01-30 14:13:33 +01:00
05e941e449 Allow dynamic genration of coupon code for some newsletters
Those newsletters that allow updating their body html should
persist the couponId along side the Coupon block settings so
that on the next rendering attempt the same coupon code is
used

[MAILPOET-4763]
2023-01-30 12:46:38 +01:00
6a14a3f7b1 Stop saving invalid input values
MAILPOET-4762
2023-01-30 11:48:48 +01:00
b858f1159a Update tests and remove unused variables
MAILPOET-4762
2023-01-30 11:48:48 +01:00
f3d73aae03 Escape the content for placeholder
MAILPOET-4762
2023-01-30 11:48:48 +01:00
494723c818 Use WooCommerce decimal separators when validating input fields
We need to use the decimal separators selected by the user for our validation. We are also using the validation used on the adding/editing coupon page

MAILPOET-4762
2023-01-30 11:48:48 +01:00
93af9d491d Add validation for some fields
MAILPOET-4762
2023-01-30 11:48:48 +01:00
b07d34ee23 Fix tests
MAILPOET-4762
2023-01-30 11:48:48 +01:00
4b2b94db9e Add Products and Exclude products Usage restriction fields
MAILPOET-4762
2023-01-30 11:48:48 +01:00
77b9cea62c Add Product categories and Exclude categories Usage restriction fields
MAILPOET-4762
2023-01-30 11:48:48 +01:00
e2dc137b59 Add Usage limit fields and half of Usage restriction fields
MAILPOET-4762
2023-01-30 11:48:48 +01:00
2da4f5f3b9 Add basic accordion to group coupon data and free shipping field
MAILPOET-4762
2023-01-30 11:48:48 +01:00
7549ed7f0f Add other WooCommerce coupon option methods
MAILPOET-4762
2023-01-30 11:48:48 +01:00
0719f3c4e3 Add small code style improvements
[MAILPOET-4761]
2023-01-30 09:36:21 +01:00
ba055b4278 Move static variable into a property
[MAILPOET-4761]
2023-01-30 09:36:21 +01:00
0b5a809883 Extend CouponPreProcessor unit test
[MAILPOET-4761]
2023-01-30 09:36:21 +01:00
a4f7a05bff Disable coupon generating when coupon id is set
[MAILPOET-4761]
2023-01-30 09:36:21 +01:00
1730578a23 Use coupon id instead of text
[MAILPOET-4761]
2023-01-30 09:36:21 +01:00
f88623e48d Add settings code and resetting placeholder
[MAILPOET-4761]
2023-01-30 09:36:21 +01:00
46fdd8eeb3 Add select with existing coupons
[MAILPOET-4761]
2023-01-30 09:36:21 +01:00
40f4216ff8 Add method for getting WC coupons
[MAILPOET-4761]
2023-01-30 09:36:21 +01:00
fe536fcdd0 Add coupon source switch
[MAILPOET-4761]
2023-01-30 09:36:21 +01:00
62cff7b388 Refactor analytics data campaigns_count to be more future proof
[MAILPOET-5014]
2023-01-30 09:21:39 +01:00
b24beb1dae Track only revenue data in the current shop currency
This is a protection against an edge case when a shop changes
the currency. We want to make sure we don't mix currencies.
[MAILPOET-5014]
2023-01-30 09:21:39 +01:00
b52c53f7f5 Add comment about revenue being tracked once per purchase
[MAILPOET-5014]
2023-01-30 09:21:39 +01:00
f66be1b947 Improve typehints and doctypes for the woo revenue tracking
[MAILPOET-5014]
2023-01-30 09:21:39 +01:00
5d3b26bb58 Remove unnecessary tracking enabled check
Registering the hook doesn't cost us much and it makes sense to register
it even when the tracking is disabled so that the data are always loaded
when calling: wp wc tracker snapshot --format=yaml
[MAILPOET-5014]
2023-01-30 09:21:39 +01:00
55b64d0354 Flatten array campaigns revenue tracking data
This format will be more suitable for further processing for Looker.
[MAILPOET-5014]
2023-01-30 09:21:39 +01:00
7ce1b6eb6c Cast numeric revenue tracking data
[MAILPOET-5014]
2023-01-30 09:21:39 +01:00
97b42a4a91 Add currency of the store to the tracking data
[MAILPOET-5014]
2023-01-30 09:21:39 +01:00
bedde323bd Add proper test group for the tracker integration test
[MAILPOET-5014]
2023-01-30 09:21:39 +01:00
0cf2787937 Add email campaigns count to WC tracker data
[MAILPOET-5014]
2023-01-30 09:21:39 +01:00
f0bc53766b Catch and log errors when fetching data in MailPoet Woo Tracker
[MAILPOET-5014]
2023-01-30 09:21:39 +01:00
f7fc2c16c1 Add Woo revenues to test/dev data generator for Woo revenues
[MAILPOET-5014]
2023-01-30 09:21:39 +01:00
f6d80b6e8b Fix type error in Woo orders data generator script
[MAILPOET-5014]
2023-01-30 09:21:39 +01:00
17d3f66316 Register filter for tracking revenue data
[MAILPOET-5014]
2023-01-30 09:21:39 +01:00
23e08ecb44 Add method for fetching revenue data for the WC Tracker
[MAILPOET-5014]
2023-01-30 09:21:39 +01:00
4dfdfc8423 Add dummy Woo Tracker class
[MAILPOET-5014]
2023-01-30 09:21:39 +01:00
5cdce529b5 Create integration docker containers prior running tests
This fixes Error response from daemon: Conflict. The container name "/wordpress_0".
which occasionally occurs when integration tests start.
We applied the same fix for the acceptance tests and it fixed the issue.
[MAILPOET-4947]
2023-01-30 09:15:23 +01:00
522b8a87db Fix flaky MailerLog testItTruncatesOutdatedEntriesWhenIncrementingSentCount
The test was setting the value that was later checked to the very edge of the allowed interval.
So if the tested method was executed a second later test failed.
This commit sets the tested value a second before the end or the interval so
there should be enough time for the method to run with the expected outcome.
[MAILPOET-4866]
2023-01-30 09:32:31 +02:00
6e8660dcc4 Update Readme with the remaining info
[MAILPOET-4944]
2023-01-26 16:46:58 +01:00
936b7fed74 Update Readme with test environment
[MAILPOET-4944]
2023-01-26 16:46:58 +01:00
d87794aa1f Reorder tests structure
[MAILPOET-4944]
2023-01-26 16:46:58 +01:00
8675aaef6e Update Readme with headless info 2023-01-26 16:46:58 +01:00
824e097639 Update Readme file 2023-01-26 16:46:58 +01:00
dce8e94f8e Add Readme file
[MAILPOET-4944]
2023-01-26 16:46:58 +01:00
e22ffcb5e3 Establishing k6 into mailpoet env
[MAILPOET-4944]
2023-01-26 16:46:58 +01:00
8f94096cdd Hide unnecessary close button, that causes vertical scrollbars in form editor on desktops
[MAILPOET-4607]
2023-01-26 14:45:33 +01:00
faa17b0d5c Add animation on close button in form editor
[MAILPOET-4607]
2023-01-26 14:45:33 +01:00
c4d4a6e594 Add bottom padding so the HelpScout icon never overlays editor's UI
[MAILPOET-4605]
2023-01-26 14:27:55 +01:00
9937bcc2d5 Remove custom HelpScout position in form editor
[MAILPOET-4605]
2023-01-26 14:27:55 +01:00
031c7d9866 Expose external link component
[PREMIUM-215]
2023-01-26 14:12:22 +01:00
0e84ddb957 Fix error styles for radio inputs
[PREMIUM-215]
2023-01-26 14:12:22 +01:00
5672823472 Export automation config for reuse
[PREMIUM-215]
2023-01-26 14:12:22 +01:00
d03e11f938 Use detected locale in localized strings
[PREMIUM-215]
2023-01-26 14:12:22 +01:00
3dbd91bfef Add Intl.Locale detection for formatting localized strings
[PREMIUM-215]
2023-01-26 14:12:22 +01:00
d0ff2a9eae Process also day format for custom fields
Although not currently offered in the UI, day format is partially implemented and passes validation.

[PREMIUM-215]
2023-01-26 14:12:22 +01:00
78314944aa Do not require default props in the premium plugin
This aligns the configuration with the free plugin.

[PREMIUM-215]
2023-01-26 14:12:22 +01:00
872bf07b25 Remove hover effect from plain titles
This is consisteng with Gutenberg editor behavior.

[PREMIUM-215]
2023-01-26 14:12:22 +01:00
17b79ee29f Expose textarea, radio, and select components
[PREMIUM-215]
2023-01-26 14:12:22 +01:00
f5b411e2ae Use plugin context for segments in automation UI
[PREMIUM-215]
2023-01-26 14:12:22 +01:00
e3e865eac5 Use plugin context to load list of segments
[PREMIUM-215]
2023-01-26 14:12:22 +01:00
6b7ffbc4ad Allow plugins to add their own context data for automation editor
[PREMIUM-215]
2023-01-26 14:12:22 +01:00
4ddcc14eee Rename context to registry
This will align better with the backend naming as well as free up "context" for other purposes.

[PREMIUM-215]
2023-01-26 14:12:22 +01:00
7bca78e268 Add placeholder step for subscriber update action
[PREMIUM-215]
2023-01-26 14:12:22 +01:00
82159dd4c5 Hide Screen options from Landing Page
[MAILPOET-5017]
2023-01-26 09:31:27 +01:00
1e76b214ea Don't load HelpScout Beacon on Dotcom Ecommerce plan
[MAILPOET-5017]
2023-01-26 09:31:27 +01:00
8c44364dab Hide Screen options from Welcome Wizard
[MAILPOET-5017]
2023-01-26 09:31:27 +01:00
7aea3528c4 Allow full-site-editing and wpcomsh plugins in ConflictResolver
[MAILPOET-5017]
2023-01-26 09:31:27 +01:00
b7809608d1 Fix distorted website icon on Dotcom
[MAILPOET-5017]
2023-01-26 09:31:27 +01:00
19bb957ae7 Fix confirmation link text
[MAILPOET-4931]
2023-01-25 20:22:08 +01:00
6e5ba84aab Disable visual editor for confirmation email in acceptance test
[MAILPOET-4931]
2023-01-25 20:22:08 +01:00
1a20f53916 Allow confirmation emails preview
[MAILPOET-4931]
2023-01-25 20:22:08 +01:00
57d364d142 Enable visual confirmation emails by default
[MAILPOET-4931]
2023-01-25 20:22:08 +01:00
89f76f67ca Rename old migrations
Because we expect that our plugin can recover from an invalid DB state.
We rename old migrations that ensure both migrations are executed again.
[MAILPOET-4962]
2023-01-25 20:21:13 +01:00
5e589cd5e3 Release 4.5.2 2023-01-25 13:52:19 -03:00
139fb2f1ad Hide Automations and Upgrade in landingpage
[MAILPOET-5019]
2023-01-25 13:42:43 +01:00
5e7ece1e87 Add mailpoet-landingpage to avoid redirection
[MAILPOET-5019]
2023-01-25 13:42:43 +01:00
47a4e3b4e9 Hide menu entries when not setup yet
[MAILPOET-5019]
2023-01-25 13:42:43 +01:00
0019ad110e Update DisplayFormInWPContent::display method type and add more tests
MAILPOET-4885
MAILPOET-4820
2023-01-25 13:15:08 +01:00
62325dc096 Fix multiple forms display on pages with Woocommerce [products] shortcode
MAILPOET-4885
2023-01-25 13:15:08 +01:00
290aceb0e9 Update copy of list visibility setting
[MAILPOET-4906]
2023-01-25 08:59:29 +01:00
a9f4e47fe0 Release 4.5.1 2023-01-24 11:47:42 -03:00
ede135c2b4 Update pnpm to the latest version
[MAILPOET-5016]
2023-01-24 15:51:21 +02:00
8ba6739356 Remove forgotten console.log
[MAILPOET-4686]
2023-01-23 17:01:13 +01:00
cef5959fff Add small code improvements
I added small code style fixes based on the code review.
[MAILPOET-4686]
2023-01-23 17:01:13 +01:00
9f81b2c787 Hide modal with poll in test
[MAILPOET-4686]
2023-01-23 17:01:13 +01:00
5885bd7f84 Add deactivation poll initialization
[MAILPOET-4686]
2023-01-23 17:01:13 +01:00
f1d8ba51df Add deactivation poll config wrapper
[MAILPOET-4686]
2023-01-23 17:01:13 +01:00
39a9bf8e4c Add semantic markup for homepage section component
[MAILPOET-4827]
2023-01-23 16:48:52 +01:00
8dfb36cc3c Remove unused classname from product discovery list
[MAILPOET-4827]
2023-01-23 16:48:52 +01:00
fdbd25c513 Refactor always use camel case within homepage data passed to JS
[MAILPOET-4827]
2023-01-23 16:48:52 +01:00
ef5ec6367e Extend homepage acceptance test to check also product discovery section
[MAILPOET-4827]
2023-01-23 16:48:52 +01:00
c5b181949b Make complete tasks in product discovery non clickable
[MAILPOET-4827]
2023-01-23 16:48:52 +01:00
03d7306611 Add check from automation flows with welcome emails
This commit improves the check that a user has set a welcome email campaign (a task in product discovery task list)
by checking also for automation flows that are triggered by new subscriber or user and contain
send email action.
[MAILPOET-4827]
2023-01-23 16:48:52 +01:00
fd5e8b6855 Add tracking of homepage discovery tasks clicks
[MAILPOET-4827]
2023-01-23 16:48:52 +01:00
47e46aeebe Improve mixpanel track wrapper to support options and callback params
When tracking links we need to use callback parameter to ensure the event is tracked
before the page is redirected to the link.
See https://developer.mixpanel.com/docs/javascript-full-api-reference#mixpaneltrack
[MAILPOET-4827]
2023-01-23 16:48:52 +01:00
56aae5cc99 Add dismiss product discovery CTA when all tasks are done
[MAILPOET-4827]
2023-01-23 16:48:52 +01:00
84df282c0a Add css for small screens for product discovery
[MAILPOET-4827]
2023-01-23 16:48:52 +01:00
a95c5bd1e9 Style product discovery section
[MAILPOET-4827]
2023-01-23 16:48:52 +01:00
c1b552b5ff Display proper product discovery tasks if Woo is active
[MAILPOET-4827]
2023-01-23 16:48:52 +01:00
18c2e53af8 Display different message when discovery task is done
[MAILPOET-4827]
2023-01-23 16:48:52 +01:00
e3808f7a61 Display product discovery tasks status in UI
[MAILPOET-4827]
2023-01-23 16:48:52 +01:00
68187a0fb6 Add product discovery status detection to homepage data service
[MAILPOET-4827]
2023-01-23 16:48:52 +01:00
f50dcd3bd1 Fetch task list status only when task list is displayed
[MAILPOET-4827]
2023-01-23 16:48:52 +01:00
ce8191ad6c Add test for HomepageDataController
[MAILPOET-4827]
2023-01-23 16:48:52 +01:00
5fe02fcc3e Refactor homepage data fetching to a new service
[MAILPOET-4827]
2023-01-23 16:48:52 +01:00
f31086f790 Refactor section hiding from specific homepage sections to parent component
This was done so that we can safely skip loading data for hidden sections.
[MAILPOET-4827]
2023-01-23 16:48:52 +01:00
be20537587 Refactor homepage contents to an extra component
[MAILPOET-4827]
2023-01-23 16:48:52 +01:00
708813c6cb Display illustrations in product discovery tasks
[MAILPOET-4827]
2023-01-23 16:48:52 +01:00
3b3cd055df Add illustration assets for product discovery tasks
[MAILPOET-4827]
2023-01-23 16:48:52 +01:00
4b438242ab Add simple product discovery tasks
[MAILPOET-4827]
2023-01-23 16:48:52 +01:00
722e6f9d27 Add functionality for hiding the product discovery section
[MAILPOET-4827]
2023-01-23 16:48:52 +01:00
7b431d9291 Add basic product discovery component
[MAILPOET-4827]
2023-01-23 16:48:52 +01:00
30c6e6f769 Set reasonable default values until validation is built
[MAILPOET-4678]
2023-01-23 16:37:55 +01:00
8b2b8c3d48 Reduce standalone wait time from 10s to 2s.
We plan to increase this wait time if the test gets flakier

MAILPOET-4881
2023-01-23 16:23:30 +01:00
0b5c65d568 Fix ManageSegmentsCest:deleteExistingSegment
MAILPOET-4881
2023-01-23 16:23:30 +01:00
49b2f5528f Remove Migration class
Remove from container, test factory and PHPStan baselines.

[MAILPOET-4478]
2023-01-23 15:35:50 +01:00
6bc58e23c9 Remove Migration worker
[MAILPOET-4478]
2023-01-23 15:35:50 +01:00
7e66adcc0b Remove check for active migration
[MAILPOET-4478]
2023-01-23 15:35:50 +01:00
24b906a738 Use Bounce instead of Migration in test
[MAILPOET-4478]
2023-01-23 15:35:50 +01:00
ddbce0d636 Remove migration test cases
Remove also the function to enable the migration.

[MAILPOET-4478]
2023-01-23 15:35:50 +01:00
277f870178 Remove migration test
[MAILPOET-4478]
2023-01-23 15:35:50 +01:00
4be7f37bbc Remove the feature flag from Landing page
MAILPOET-4803
2023-01-23 15:13:38 +01:00
9ac18ab69e Update styling and use semantic HTML
MAILPOET-4799
2023-01-23 14:09:16 +01:00
1bec3b4637 Remove image assets from plugin directory
MAILPOET-4799
2023-01-23 14:09:16 +01:00
33e74bb0dd Fix mobile issues for FAQ section
MAILPOET-4799
2023-01-23 14:09:16 +01:00
89d5f108e4 Design the landing page
Add the content and images for the landing page

MAILPOET-4799
2023-01-23 14:09:16 +01:00
e4d00171b4 Fix issue in test where string was set to newsletter body
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
9f070f1914 Check blockDefaults.coupon when trying to delete its props
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
94b5803337 Cleanup coupon data from template on save
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
9a2d4e83b2 Change NewsletterCoupon::cleanupSensitiveData signature
This change allows passing body array and retuning body array
so that NewsletterEntity instance doesn't need to get passed
around

[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
59d91ff7ef Fix failing unit test
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
bfe658fc86 Replace coupon code with code placeholder when duplicationg
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
7ced42a494 Fix bug when duplicated newsletter uses the source's coupon
On duplication, the sensitive data of the coupon were
inherited from the source

[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
6164a92b9f Cleanup coupon sensitive data from blockDefaults
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
7b11962bf2 Update translators hint for the coupon description
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
3c7f1021b6 Re-adjust percent sign positioning
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
644412998a Adjust percent sign positioning
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
c1afee57e9 Fix bug causing the percent sign to move on scroll
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
ac1d014562 Fix bug in validating on render
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
71322ee512 Add newsletter id to the coupon description
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
dc2638a3ab Augment comment for CouponPreProcessor::shouldPersist
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
41b23b24b9 Add Coupon block feature flag
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
9c8afa85d4 Add more unit tests for CouponPreProcessor
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
18c3424f03 Add validation to expiry days field of coupon block
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
1b1ee34acf Adjust styling and add validation to coupon amount
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
d963bb4e7d Update coupon setting view styling
Adds percentage sign when the discount type is of percentage
type, adjusts the width and view of coupon amount field

[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
b1f42bbeba Add unit tests for CouponPreProcessor
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
dcdb447578 Properly check for existance of code in coupon block setting
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
39d22bdd62 Move Coupon instantiation to MailPoet\WooCommerce\Helper
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
e4c9d037b1 Add missing strict_types to Coupon.php
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
d1ad7fecd7 Fix mistake in comment
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
4b92a9a4a5 Allow coupon generation per render for automatic emails
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
9d65fe8d5e Persist coupon block expiration in WC_Coupon
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
c353830163 Make sure coupon code placeholder doesn't generate coupon
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
6dd87b0dec Add functionality to update coupon when block settings change
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
fa3216be9b Set missing parameters when creating coupon
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
31201eb3cc Generate coupon code for each coupon block missing the code
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
48c075b730 Add WC helper function to retrieve coupon code from id
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
14c85e3380 Pass Coupon code placeholder from PHP and unify
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
f551d4388c Add CouponPreprocessor to create coupons before rendering
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
751dc539f6 Add information overlay to Coupon block
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
d305680ba5 Remove coupon code input from the settings sidebar
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
bb7775f87b Render Coupon block in email body
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
54d9b517dd Adjust coupon block styling in editor
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
199910a52f Add coupon block config
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
983102c094 Add Coupon block setting pane
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
0d330e08b4 Bootstrap Coupon block and make it function
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
ccd1a5363d Fix typo in variable
[MAILPOET-4510]
2023-01-19 10:52:51 +01:00
c368b130b8 Add wait calls to prevent calling translations API too quickly
This commit is an attempt to prevent 429 "Too manu requests" errors
we sometimes experience during the Switching languages test.
[MAILPOET-4969]
2023-01-17 14:21:59 +01:00
3ffe99d5ab Release 4.5.0 2023-01-17 15:14:55 +02:00
339068c086 Set isBusy state for OptionButton
[MAILPOET-4918]
2023-01-16 14:15:23 +01:00
dad40e262f Set isBusy state for FromScratch buttons
[MAILPOET-4918]
2023-01-16 14:15:23 +01:00
0bbd65ac61 Sanitize segment data when persisty via public API
[MAILPOET-4942]
2023-01-16 13:59:30 +01:00
1a7b7d1936 Escape segment name for usage in html select
[MAILPOET-4942]
2023-01-16 13:59:30 +01:00
2bbaa246d7 Sanitize name and description of segment when saving
[MAILPOET-4942]
2023-01-16 13:59:30 +01:00
296ec54c3e Add function preparing error response
[MAILPOET-4639]
2023-01-16 13:46:07 +01:00
579de1cc86 Reduce the count of constants
[MAILPOET-4639]
2023-01-16 13:46:07 +01:00
da88250fe1 Update integration tests
[MAILPOET-4639]
2023-01-16 13:46:07 +01:00
ad831316ab Remove unused constants
[MAILPOET-4639]
2023-01-16 13:46:07 +01:00
2e97cb6924 Fix tests after last changes
[MAILPOET-4639]
2023-01-16 13:46:07 +01:00
c79787c677 Extract domain creation error messages from bridge to strings
As a part of those changes I tried to unify the array key with error messages.
[MAILPOET-4639]
2023-01-16 13:46:07 +01:00
07954dd968 Extract domain verification error messages from bridge to strings
As a part of those changes I tried to unify the array key with error messages.
[MAILPOET-4639]
2023-01-16 13:46:07 +01:00
2ace6da75b Extract email authorization error messages from bridge to strings
As a part of those changes I tried to unify the array key with error messages.
[MAILPOET-4639]
2023-01-16 13:46:07 +01:00
982568445b Extract sending error messages from bridge to strings
The original error is stored under a new key for easier handling an error state.
[MAILPOET-4639]
2023-01-16 13:46:07 +01:00
a53e446583 Add request cache to TranslationUpdater
WP may call the action we hook into more times during one request.
This commit adds simple caching to prevent multiple requests.
[MAILPOET-4909]
2023-01-12 14:08:31 +01:00
b033d7d92f Add error logging when fetching language packs info
[MAILPOET-4909]
2023-01-12 14:08:31 +01:00
1190d61ca3 Update mailpoet_shortcodes tinyMce extension to work with v6
[MAILPOET-4963]
2023-01-11 14:19:03 +01:00
7da5cc847f Make completed tasks in task list not interact-able
[MAILPOET-4826]
2023-01-11 11:30:10 +01:00
2778244faf Use nicer name for property that indicates complete task
[MAILPOET-4826]
2023-01-11 11:30:10 +01:00
3789379084 Add error boundaries to the homepage app
[MAILPOET-4826]
2023-01-11 11:30:10 +01:00
72e3c87190 Add basic acceptance test for the homepage task list
[MAILPOET-4826]
2023-01-11 11:30:10 +01:00
38640e65e4 Add complete state task titles and additional task contents
[MAILPOET-4826]
2023-01-11 11:30:10 +01:00
e0718f11ea Add message when task list is complete
[MAILPOET-4826]
2023-01-11 11:30:10 +01:00
eb7cc97ca2 Add styles for task list heading
[MAILPOET-4826]
2023-01-11 11:30:10 +01:00
24d3c0b13b Display WooCommerce import task based on customers count
We use the same logic in WooCommerce setup page
[MAILPOET-4826]
2023-01-11 11:30:10 +01:00
ec0b1d4de8 Highlight current task in task list on homepage
[MAILPOET-4826]
2023-01-11 11:30:10 +01:00
56c90ef452 Add styles and links for homepage task list
[MAILPOET-4826]
2023-01-11 11:30:10 +01:00
5f0ac0ec7e Render simple task list items with state info
[MAILPOET-4826]
2023-01-11 11:30:10 +01:00
8c767af5c6 Store homepage task list was dismissed to DB
[MAILPOET-4826]
2023-01-11 11:30:10 +01:00
b0e8263e2f Hide the task list and store the state in the store
[MAILPOET-4826]
2023-01-11 11:30:10 +01:00
be592dbf9b Add an empty wordpress/data store to homepage
We plan to add more dynamic sections to the homepage so I want to set up and use the
store from the beginning.
[MAILPOET-4826]
2023-01-11 11:30:10 +01:00
3679320483 Add dummy hide list button
[MAILPOET-4826]
2023-01-11 11:30:10 +01:00
51ab4523f8 Add basic task list component for homepage
[MAILPOET-4826]
2023-01-11 11:30:10 +01:00
60abe14c7a Remove text-domain rule from shared-ruleset
[MAILPOET-4913]
2023-01-11 07:46:57 +02:00
f58b5e61b0 Use new ruleset for free plugin
[MAILPOET-4913]
2023-01-11 07:46:57 +02:00
dbb972ec3f Create ruleset for free and premium and a shared ruleset
[MAILPOET-4913]
2023-01-11 07:46:57 +02:00
1930410754 Release 4.4.0 2023-01-10 15:45:22 +01:00
539df2a994 Switch to @wordpress/i18n and clean up
MAILPOET-4798
2023-01-10 15:23:50 +01:00
ad41ef2f5e Add FAQ accordion and contents
MAILPOET-4798
2023-01-10 15:23:50 +01:00
7ed0a92eda Add padding class to header and footer
MAILPOET-4798
2023-01-10 15:23:50 +01:00
9471314917 Add Landingpage Faq component and text
MAILPOET-4798
2023-01-10 15:23:50 +01:00
69440ec2a6 Add migration with a fix for inconsistent MailerLog data
[MAILPOET-4940]
2023-01-09 20:01:47 +01:00
0bbdf4b47f Add error log when pausing sending due an error
[MAILPOET-4940]
2023-01-09 20:01:47 +01:00
f11aca925f Do not attempt to send a confirmation email when sending is paused
When sending is paused due to some MSS configuration error the confirmation
email error may cause that the important error from MSS gets overwritten
event reset in case the mail is accidentally sent.
[MAILPOET-4940]
2023-01-09 20:01:47 +01:00
e4029a607a Adopt logging test to warning instead of error
[MAILPOET-4639]
2023-01-09 15:23:48 +01:00
eb53973799 Remove logEntity cleanup
[MAILPOET-4639]
2023-01-09 15:23:48 +01:00
aab8281af0 Remove request data from logged context
[MAILPOET-4639]
2023-01-09 15:23:48 +01:00
3df00548ab Change logged error to warning
[MAILPOET-4639]
2023-01-09 15:23:48 +01:00
ada346f4ef Add logging to php error log
[MAILPOET-4104]
2023-01-09 15:23:48 +01:00
b3691a4625 Detach invalid entity
[MAILPOET-4104]
2023-01-09 15:23:48 +01:00
e02b631172 Add log entities cleanup
[MAILPOET-4104]
2023-01-09 15:23:48 +01:00
2200411455 Add test case for logged error
[MAILPOET-4104]
2023-01-09 15:23:48 +01:00
b0ab2f404f Add logging errors to the log table
[MAILPOET-4104]
2023-01-09 15:23:48 +01:00
4195428643 Add API topic
[MAILPOET-4104]
2023-01-09 15:23:48 +01:00
1692c9bef5 Fix typo in strings
MAILPOET-4797
2023-01-09 14:38:09 +01:00
cb25cf2944 Handle redirect to welcome wizard with named function
MAILPOET-4797
2023-01-09 14:38:09 +01:00
794c5ce2d5 Extract landing page content into Header and Footer components
MAILPOET-4797
2023-01-09 14:38:09 +01:00
974d2d5a59 Add welcome_wizard_url variable
MAILPOET-4797
2023-01-09 14:38:09 +01:00
2ebcad1468 Exclude Notices from landingpage
MAILPOET-4797
2023-01-09 14:38:09 +01:00
671c7eed7d Add React landingpage component
MAILPOET-4797
2023-01-09 14:38:09 +01:00
72de76fe9b Fix multi site tests 2023-01-09 10:49:24 +01:00
53cc357632 Fix step info being rendered inside inserter popover
[MAILPOET-4922]
2023-01-06 18:31:36 +01:00
47d3472fef Fix acceptance tests error and add acceptance test for landing page
MAILPOET-4795
2023-01-06 18:29:46 +01:00
05c5b46089 Redirect to landingpage when welcome wizard is not filled
MAILPOET-4795
2023-01-06 18:29:46 +01:00
f85bd8622f Add comment explaining the usage of the method
MAILPOET-4795
2023-01-06 18:29:46 +01:00
503cf61c0f Do not redirect when activated with bulk activation mode
MAILPOET-4795
2023-01-06 18:29:46 +01:00
d9eca55189 Redirect to Landing page after plugin activation
MAILPOET-4795
2023-01-06 18:29:46 +01:00
e850eaa90c Add Landing page and hide behind feature flag
MAILPOET-4795
2023-01-06 18:29:46 +01:00
478eab61e4 Add Landingpage feature flag
MAILPOET-4795
2023-01-06 18:29:46 +01:00
ea53728799 Add period at the end of delay action description
[MAILPOET-4928]
2023-01-06 18:26:30 +01:00
914d0d37c0 Add periods at the end of automation action descriptions
[MAILPOET-4928]
2023-01-06 18:26:30 +01:00
c1aae2c192 Update usage of settings inside tinymce callbacks
Settings are now accesable via this.options.get
[MAILPOET-4213]
2023-01-04 14:46:59 +01:00
03cdcb30f8 Add missing tinymce DOM model
[MAILPOET-4213]
2023-01-04 14:46:59 +01:00
a462e72b30 Update name of the used plugin from formatselect to blocks
In v6 formatselect is renamed to blocks
[MAILPOET-4213]
2023-01-04 14:46:59 +01:00
83db3db90d Remove explicit addition of paste plugin as it's added to core
[MAILPOET-4213]
2023-01-04 14:46:59 +01:00
9495a40900 Convert TextEditorBehavior.js to TS
[MAILPOET-4213]
2023-01-04 14:46:59 +01:00
dbc2c9c240 Update tinymce package
[MAILPOET-4213]
2023-01-04 14:46:59 +01:00
d6bd1a5527 Release 4.3.1 2023-01-03 13:58:02 -06:00
c5cd863f15 Use database() value for column existing detection
[MAILPOET-4916]
2023-01-02 14:37:33 +01:00
8ef1bfaf24 Add acceptance test for homepage basic functionality
[MAILPOET-4825]
2023-01-02 14:13:53 +01:00
abac8d7147 Move MailerError notice component to notices namespace
[MAILPOET-4825]
2023-01-02 14:13:53 +01:00
367bcaf233 Refactor MailerError notice props to camel case
[MAILPOET-4825]
2023-01-02 14:13:53 +01:00
fdbb9428d9 Refactor MailerError notice to Typescript
[MAILPOET-4825]
2023-01-02 14:13:53 +01:00
bd047a0108 Automatically hide MailerError notice after resuming sending
[MAILPOET-4825]
2023-01-02 14:13:53 +01:00
05202d572f Add Mailer Error notice to homepage
This commit reuses the MailerError component to render important errors related to issues in sending.

I needed to slightly modify the MailerError notice component to be able to render as inline notice.
When rendered as non-inline WordPress JS code grabbed it and moved in DOM breaking all callbacks.
[MAILPOET-4825]
2023-01-02 14:13:53 +01:00
a698e416ad Allow all permanent notices on all pages except the wizard page
[MAILPOET-4825]
2023-01-02 14:13:53 +01:00
1efc417f82 Add TransactionalEmailsProposeOptInNotice on homepage
[MAILPOET-4825]
2023-01-02 14:13:53 +01:00
4dc31bbdb0 Add InvalidMssKeyNotice to homepage
[MAILPOET-4825]
2023-01-02 14:13:53 +01:00
12dc727fda Refactor SubscribersLimitNotice to TS
[MAILPOET-4825]
2023-01-02 14:13:53 +01:00
6602103d0f Add email volume limit notice
[MAILPOET-4825]
2023-01-02 14:13:53 +01:00
f3e8fb8ae2 Add subscribers limit notice to homepage
[MAILPOET-4825]
2023-01-02 14:13:53 +01:00
a205d4d7f4 Add basic support for dynamic notices
[MAILPOET-4825]
2023-01-02 14:13:53 +01:00
1783ca6e42 Add basic top bar with beamer at homepage
[MAILPOET-4825]
2023-01-02 14:13:53 +01:00
6555833fb6 Add test case for scheduled tasks
[MAILPOET-3995]
2023-01-02 12:07:24 +01:00
ce3b9b2b7b Remove redundant variables
[MAILPOET-3995]
2023-01-02 12:07:24 +01:00
1a653c5676 Add small code style improvements
[MAILPOET-3995]
2023-01-02 12:07:24 +01:00
85a8d8aedb Move more specific conditions into private methods
[MAILPOET-3995]
2023-01-02 12:07:24 +01:00
5c453fcd54 Add list of simple workers
To avoid code repetition I added a const with a list of simple workers that was used in a loop.
[MAILPOET-3995]
2023-01-02 12:07:24 +01:00
ec9adf8a6c Add missing test cases
[MAILPOET-3995]
2023-01-02 12:07:24 +01:00
b5064ca46f Remove old model from WordPressTest
[MAILPOET-3995]
2023-01-02 12:07:24 +01:00
84b97ead76 Make parameter scheduledAt optional
[MAILPOET-3995]
2023-01-02 12:07:24 +01:00
4e578238f7 Improve code style in WordPressTest
[MAILPOET-3995]
2023-01-02 12:07:24 +01:00
bb6d6137aa Stop checking if website is on HTTPS for 1-click-unsubscribe
[MAILPOET-4859]
2022-12-29 11:18:25 +01:00
74c7728e3a Fix issue with passing too few params to tested class 2022-12-28 20:02:36 +03:00
e13113e38b Fix condition for pausing sending when confirmation emails fail
[MAILPOET-4736]
2022-12-28 14:25:56 +01:00
68db0dbefe Don't process soft sending errors via MailerLog in confirmation mailer
Soft errors are usually related to the particular email address. We don't want to
pause sending due soft errors.
[MAILPOET-4736]
2022-12-28 14:25:56 +01:00
e015302a94 Update the confirmation email error message
[MAILPOET-4736]
2022-12-28 14:25:56 +01:00
20fcf23f8f Add processing of sending errors to the confirmation mailer
[MAILPOET-4736]
2022-12-28 14:25:56 +01:00
11beebf74d Add MailerLog method for handling transactional emails errors
The new method allows processing sending errors that happen when sending from other places of plugin
then from the Sending Queue worker.
After three failed attempts it pauses the sending and admin user will see an notice.
[MAILPOET-4736]
2022-12-28 14:25:56 +01:00
5a53406d33 Show error in form if confirmation email fails
[MAILPOET-4736]
2022-12-28 14:25:56 +01:00
ee83e4d748 Refactor SubscriberActions:subscribe to return status of confirmation email
We need to pass the error or success info about the confirmation email
in order to be able to be able to display the error message.
[MAILPOET-4736]
2022-12-28 14:25:56 +01:00
970db8f0d8 Prevent undefined function request_filesystem_credentials error
The function request_filesystem_credentials was not loaded when
running translation update during regular page load.
This commit ensures the function is loaded.
[MAILPOET-4902]
2022-12-28 13:24:47 +01:00
71828f9f6e Fix WC Checkout test by stoping to toggle removed setting
Starting from wc@7.2 the WC Blocks compatible version's
Checkout block doesn't offer the option to enable/disable
creating checkout on checkout, and this is only controllled
via the WC settings page

[MAILPOET-4925]
2022-12-23 10:28:35 +01:00
0525dd0f56 Update cerdic/css-tidy to version 2.0.3 to remove PHP 8.2 warnings
PHP 8.2 deprecates dynamic properties. The version of the Composer package cerdic/css-tidy that we are using relies on dynamic properties and thus MailPoet is generating a few deprecation warnings when running with PHP 8.2. Updating cerdic/css-tidy to the latest version remove those warnings as this was already fixed by the package maintainers.

[MAILPOET-4857]
2022-12-21 10:50:05 +01:00
e3ba525195 Unify inheritance with other processors
[MAILPOET-4735]
2022-12-21 10:07:35 +01:00
1eed55cbce Indicate optional processors
[MAILPOET-4735]
2022-12-21 10:07:35 +01:00
fd1331e602 Add plugins version to logs
[MAILPOET-4735]
2022-12-21 10:07:35 +01:00
02b82c04f3 Release 4.3.0 2022-12-20 16:25:45 +01:00
ad5ef6ebbc Fix ESLint errors after rebasing PR
Use async/await for promisses. Similar to what was discussed here: https://github.com/mailpoet/mailpoet/pull/4603#discussion_r1048950706

This is the ESLint error that started happening after the rebase:

```
mailpoet/assets/js/src/wizard/woocommerce_controller.tsx
  71:11  error  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises
```

[MAILPOET-4815]
2022-12-19 21:37:42 +01:00
3c5bc5b384 Fix issue in wizard.tsx with using Route.render
Route.render expects other types than the one coming out of
withBoundary, replacing it with Route.component fixes the
typing issue

[MAILPOET-4815]
2022-12-19 21:37:42 +01:00
f229df0383 Replace void with async/await based on input from PR reviewer
See https://github.com/mailpoet/mailpoet/pull/4603#discussion_r1048950706

[MAILPOET-4815]
2022-12-19 21:37:42 +01:00
9092f892d0 Refactor webpack_admin_index.jsx to TypeScript
[MAILPOET-4815]
2022-12-19 21:37:42 +01:00
9c3fb0856f Refactor wizard.jsx to TypeScript
[MAILPOET-4815]
2022-12-19 21:37:42 +01:00
2a8c665e12 Refactor welcome_wizard_controller.jsx to TypeScript
[MAILPOET-4815]
2022-12-19 21:37:42 +01:00
9b1942ce48 Refactor sender_step.jsx to TypeScript
[MAILPOET-4815]
2022-12-19 21:37:42 +01:00
932b4532f0 Change ReinstallFromScratch test now that the Welcome Wizard is mandatory
This commit updates the ReinstallFromScratch test now that the logic for
displaying the Welcome Wizard changed in
afba41ad27b8b72e892892fe386b48b5a6f59b9b. Before just loading the wizard
once was enough to dismiss it, now it is necessary to complete it. In
this commit, an utility function was created and it is used to dismiss
the wizard twice in the modified test.

[MAILPOET-4815]
2022-12-19 21:37:42 +01:00
6533a1444d Display submenu entries only after the Welcome Wizard is completed
[MAILPOET-4815]
2022-12-19 21:37:42 +01:00
05a109dcf4 Force users to complete the Welcome Wizard
This commit changes the behavior of the Welcome Wizard. Up until now,
the wizard would load once and users could opt to complete or skip it.
Now it is mandatory for the users to complete the wizard. Before we
saved the setting "version" the first time the first step of the wizard
was loaded and now we saved it when the wizard is completed.

[MAILPOET-4815]
2022-12-19 21:37:42 +01:00
5b5b7856c6 Use DI container to get an instance of Menu to simplify MenuTest
By using the DI container to get an instance of Menu we simplify
MenuTest and avoid the need to change MenuTest::getMenu() every time the
signature of the constructor of the Menu class changes, which will
happen in a subsequent commit.

[MAILPOET-4815]
2022-12-19 21:37:42 +01:00
4ceb508218 Fix typo 2022-12-19 21:37:42 +01:00
3afc7dc140 Change button in the first step of the welcome wizard
This commit changes the button "Finish later" of the first step of the
welcome wizard to "Skip this step". Both the label and the functionality
of the button changed.

[MAILPOET-4815]
2022-12-19 21:37:42 +01:00
1c1058667b Change copy of the first step of the welcome wizard
[MAILPOET-4815]
2022-12-19 21:37:42 +01:00
129aed2ae9 Add minimal error boundary to Automation app
[MAILPOET-4706]
2022-12-19 17:02:00 +01:00
f8c7adf5a6 Add error boundary to common components
[MAILPOET-4706]
2022-12-19 17:02:00 +01:00
6346d39507 Add erro boundary to newsletter app
[MAILPOET-4706]
2022-12-19 17:02:00 +01:00
1b76f3b862 Add error boundary to form editor app
[MAILPOET-4706]
2022-12-19 17:02:00 +01:00
40c140a631 Add error boundary to wizard app
[MAILPOET-4706]
2022-12-19 17:02:00 +01:00
7fd11d4fb5 Add error boundary to subscriber import/export app
[MAILPOET-4706]
2022-12-19 17:02:00 +01:00
7fa694314b Add error boundary to logs namespace
[MAILPOET-4706]
2022-12-19 17:02:00 +01:00
080e385b02 Add error boundary to experimental_features.jsx
[MAILPOET-4706]
2022-12-19 17:02:00 +01:00
7c0b625793 Add error boundaries to logs.tsx
[MAILPOET-4706]
2022-12-19 17:02:00 +01:00
f0b858b1f8 Add error boundery to underlying components in forms/forms.jsx
[MAILPOET-4706]
2022-12-19 17:02:00 +01:00
b218663e7e Add error boundary to segments/segments.jsx
[MAILPOET-4706]
2022-12-19 17:02:00 +01:00
d8ea29423d Add error boundary to newsletters_editor/initialize.jsx
[MAILPOET-4706]
2022-12-19 17:02:00 +01:00
ff038a1c56 Wrap inner components of newsletters.jsx in erro boundary
[MAILPOET-4706]
2022-12-19 17:02:00 +01:00
588e8fca6b Use withBoundary HOC in subscribers.jsx
[MAILPOET-4706]
2022-12-19 17:02:00 +01:00
8d9f23d5f8 Define error boundary and relevant HOC
[MAILPOET-4706]
2022-12-19 17:02:00 +01:00
ea4637c740 Add the possibility to skip hooks when subscribing to segments
[PREMIUM-214]
2022-12-19 12:04:28 +01:00
c0e56a4f92 Expose checkbox control
[PREMIUM-214]
2022-12-19 12:04:28 +01:00
53a4722e91 Add remove-from-list step placeholder
[PREMIUM-214]
2022-12-19 12:04:28 +01:00
d175870adf Add add-to-list step placeholder
[PREMIUM-214]
2022-12-19 12:04:28 +01:00
a64229f688 Fix automation template variables being loaded too late
[PREMIUM-214]
2022-12-19 12:04:28 +01:00
cd69e1e7b9 Refactor woocommerce_controller.jsx to TypeScript
[MAILPOET-4817]
2022-12-17 13:16:30 +01:00
321db0b004 Refactor woo_commerce_step.jsx to TypeScript
While renaming the file, I also opted to remove the underscore in
between "woo" and "commerce" as it is more common to spell "woocommerce"
without the underscore in file names and we already have at least
woocommerce_controller.jsx.

[MAILPOET-4817]
2022-12-17 13:16:30 +01:00
aaf01475b0 Simplify code to redirect to next step based on review feedback
See https://github.com/mailpoet/mailpoet/pull/4605#discussion_r1044404486

[MAILPOET-4817]
2022-12-17 13:16:30 +01:00
1cd38a396e Add parent container to the list of options in the WooCommerce step
This parent container is needed so that the last-child CSS pseudo
selector that was added in #4602 works to remove the horizontal line
from the last .mailpoet-wizard-woocommerce-option.

[MAILPOET-4817]
2022-12-17 13:16:30 +01:00
1f1c9dd077 Update copy of the Woo step of the Welcome Wizard
[MAILPOET-4817]
2022-12-17 13:16:30 +01:00
0da6d84309 Welcome Wizard: invert the order of the Woo and MSS steps
Now the Woo step comes first and then the MSS step which is always the
last step.

[MAILPOET-4817]
2022-12-17 13:16:30 +01:00
3a05598166 Improve comparison stability in test
[MAILPOET-4886]
2022-12-16 15:39:43 +01:00
5035d64298 Update the layout of the horizontal lines in the second step of the Welcome Wizard
In the second step of the wizard, it was necessary to add a <div> as a
container for all of the options, so that we could use the CSS
pseudo-class `last-child` to remove the horizontal line from the last
option.

[MAILPOET-4816]
2022-12-16 14:54:46 +01:00
56f6d20244 Update copy of the title of the second step of the Welcome Wizard
[MAILPOET-4816]
2022-12-16 14:54:46 +01:00
650d730c3f Fix lowercased captcha on built-in CAPTCHA buttons
[MAILPOET-4915]
2022-12-16 14:27:49 +01:00
decaa0f636 Fix typos
[PREMIUM-213]
2022-12-16 14:11:34 +01:00
c2b9e33b79 Show error background in FormTokenField
[PREMIUM-213]
2022-12-16 14:11:34 +01:00
34347f241d Add RemoveTag action stub
[PREMIUM-216]
2022-12-16 14:11:34 +01:00
5802f2132d Use badRequest method instead of throwing an InvalidState exception
[PREMIUM-213]
2022-12-16 14:11:34 +01:00
8e502e5f50 Rename save method to create
[PREMIUM-213]
2022-12-16 14:11:34 +01:00
0187f0cede change date keys
[PREMIUM-213]
2022-12-16 14:11:34 +01:00
8457aa7e2b Remove ToDo comments
[PREMIUM-213]
2022-12-16 14:11:34 +01:00
67156b7c6f Expose wordpress/components/spinner
[PREMIUM-213]
2022-12-16 14:11:34 +01:00
f9250b66a9 Export wordpress/data-controls
[PREMIUM-213]
2022-12-16 14:11:34 +01:00
1fcdccaa33 Expost json api endpoint
[PREMIUM-213]
2022-12-16 14:11:34 +01:00
5b93b88f46 Add Tags endpoint
[PREMIUM-213]
2022-12-16 14:11:34 +01:00
cbd41cd1be Remove unnecessary styles
[PREMIUM-213]
2022-12-16 14:11:34 +01:00
95a8943b7e Use span instead of paragraph
[PREMIUM-213]
2022-12-16 14:11:34 +01:00
dd363370f6 Remove white space
[PREMIUM-213]
2022-12-16 14:11:34 +01:00
1027a6a676 Move FormTokenField to editor components
[PREMIUM-213]
2022-12-16 14:11:34 +01:00
0fd93b0ff9 Show Upsell and LockedBadge
[PREMIUM-213]
2022-12-16 14:11:34 +01:00
bfade87b62 Add Badge with locked symbol
[PREMIUM-213]
2022-12-16 14:11:34 +01:00
26d9030544 Expose PanelBody via @wordpress/components
[PREMIUM-213]
2022-12-16 14:11:34 +01:00
5688a0daea Rename filter to mailpoet.automation.register_step_type
[PREMIUM-213]
2022-12-16 14:11:34 +01:00
92996ac781 Make mailpoet_tags available globally
[MAILPOET-4423]
2022-12-16 14:11:34 +01:00
1f471782ab Add Action stub 'Add Tag'
[PREMIUM-213]
2022-12-16 14:11:34 +01:00
320459eaab Add filter mailpoet.register_step_type
[PREMIUM-213]
2022-12-16 14:11:34 +01:00
e65b2cce02 Expose components for premium
[PREMIUM-213]
2022-12-16 14:11:34 +01:00
520ee981d3 Fix autosaving when activation link is missing
MAILPOET-4649
2022-12-15 18:15:01 +01:00
f100ef72da Add tracking and reporting information
MAILPOET-4649
2022-12-15 18:15:01 +01:00
146e1c871f Remove preview button
The preview button is a nice addition to the confirmation email template, but it's currently not part of the Jira ticket spec.

MAILPOET-4649
2022-12-15 18:15:01 +01:00
669367c9c6 Update texts and fix editor saving template with missing activation link
MAILPOET-4649
2022-12-15 18:15:01 +01:00
77d62c431a Fix coding style issues
MAILPOET-4649
2022-12-15 18:15:01 +01:00
4a5fc507ca Add tests for ConfirmationEmailCustomizer
MAILPOET-4649
2022-12-15 18:15:01 +01:00
06f59dd320 Update JS tests
MAILPOET-4649
2022-12-15 18:15:01 +01:00
4367f44449 Add support for confirmation email in newsletter editor
MAILPOET-4649
2022-12-15 18:15:01 +01:00
856e0f69d3 Add text contents and data required for confirmation email editor
MAILPOET-4649
2022-12-15 18:15:01 +01:00
c4bd2acd84 Update tests
MAILPOET-4649
2022-12-15 18:15:01 +01:00
210c240aab Update ConfirmationEmailMailer to support custom confirmation email created with the email editor from template
Setup confirmation email customizer in ConfirmationEmailMailer and trigger confirmation email template creation when visual subscription confirmation emails is enabled from settings

MAILPOET-4649
2022-12-15 18:15:01 +01:00
d19f5dc732 Add ConfirmationEmailCustomizer class and confirmation email template
MAILPOET-4649
2022-12-15 18:15:01 +01:00
6541c20466 Hide both “Email subject” and “Email content” when ConfirmationEmailCustomizer is enabled
MAILPOET-4649
2022-12-15 18:15:01 +01:00
3952484848 Add openEmailCustomizer action used by the ConfirmationEmailCustomizer component
MAILPOET-4649
2022-12-15 18:15:01 +01:00
7d918604c3 Add ConfirmationEmailCustomizer component and setup types
MAILPOET-4649
2022-12-15 18:15:01 +01:00
ffaf5b88b6 Configure integration tests oldest to use MYISAM and MySQL 5.5
[MAILPOET-4832]
2022-12-14 12:00:49 +01:00
eca4a9e923 Add integration test to ensure correct unique varchar indexes
[MAILPOET-4832]
2022-12-14 12:00:49 +01:00
1cee4e67e8 Print DB tables with engine and collation on test env star
[MAILPOET-4832]
2022-12-14 12:00:49 +01:00
b1c35b60d8 Configure acceptance tests oldest to use MYISAM db engine
[MAILPOET-4832]
2022-12-14 12:00:49 +01:00
1e5cfb4eaf Switch acceptance tests oldest to MYSQL 5.5
[MAILPOET-4832]
2022-12-14 12:00:49 +01:00
5e5956420f Release 4.2.0 2022-12-13 13:34:21 +01:00
78446d174a Fix quotes in a queries processed by $wpdb
These queries failed when ANSI_QUOTES mode is enabled
[MAILPOET-4887]
2022-12-12 13:59:09 +01:00
917d64a3e3 Print sql_mode when starting test environment
[MAILPOET-4887]
2022-12-12 13:59:09 +01:00
a3d51b2b08 Add ANSI and ONLY_FULL_GROUP_BY to sql_mode for tests environment
The default modes shipped with the mysql or mariaDB docker containers are
STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
In this commit I added ANSI, ONLY_FULL_GROUP_BY so that we are sure that we don't break compatibility with those modes
[MAILPOET-4887]
2022-12-12 13:59:09 +01:00
3ffbd6e236 Add ANSI and ONLY_FULL_GROUP_BY to sql_mode for dev environment
The default modes shipped with the mysql or mariaDB docker containers are
STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
in this commit I added ANSI, ONLY_FULL_GROUP_BY so that we are sure that we don't break compatibility with those modes
[MAILPOET-4887]
2022-12-12 13:59:09 +01:00
9753331d52 Improve sql_mode replace code to support both ANSI and ANSI_QUOTES
[MAILPOET-4887]
2022-12-12 13:59:09 +01:00
b266edb8e7 Make initial migration ANSI_QUOTES compatible
We run the initial migrations via dbDelta which internally uses
$wpdb. ANSI_QUOTES is not on the list of WPDB's incompatible modes
(767bdad516/wp-includes/class-wpdb.php (L648-L655))
So we need to make sure SQL queries we run through wpdb are ANSI_QUOTES compatible.
This commit makes initial migrations compatible with the ANSI_QUETES mode.
[MAILPOET-4887]
2022-12-12 13:59:09 +01:00
f1899055b8 Drop StepType from mailpoet.automation.step.more-controls filter
[MAILPOET-4889]
2022-12-12 12:23:52 +01:00
c3f0a36665 Make it possible to display the MP logo without a link
[MAILPOET-4819]
2022-12-08 13:30:12 +01:00
88efb1f3d1 Move logo to the top bar in the welcome wizard
[MAILPOET-4819]
2022-12-08 13:30:12 +01:00
146f5881f7 Adjustments to the layout of the welcome wizard layout
[MAILPOET-4819]
2022-12-08 13:30:12 +01:00
3279fb1154 Move regexes out of KeyActivation to avoid rerunning them in every render
[MAILPOET-4749]
2022-12-08 11:00:09 +01:00
5f5efbe876 Change title and description of the key activation settings tab
This commit changes the text of the title and the description of the key
activation settings tab to hopefully make it more clear the meaning of the
key and what they should do if they don't have one or if they are unsure
where they can get their key.

[MAILPOET-4749]
2022-12-08 11:00:09 +01:00
12afcfb656 Improve readability
[MAILPOET-3487]
2022-12-07 11:53:48 +01:00
0aac9e9d60 Test language switches in newsletters
[MAILPOET-3487]
2022-12-07 11:53:48 +01:00
4e3b1527cd If no translation for the current language exists, return 'en'
[MAILPOET-3487]
2022-12-07 11:53:48 +01:00
b27dcdd40a Use new language function in twig email templates
[MAILPOET-3487]
2022-12-07 11:53:48 +01:00
7b584dd482 Add language function to twig
[MAILPOET-3487]
2022-12-07 11:53:48 +01:00
5e71d94b62 Use website language for newsletters
[MAILPOET-3487]
2022-12-07 11:53:48 +01:00
8bb4338627 Inject WPFunctions
[MAILPOET-3487]
2022-12-07 11:53:48 +01:00
4bcd4a2cf2 Add single const to expose shortcodes for unsubscribe link
[MAILPOET-4862]
2022-12-07 10:52:07 +01:00
ea7971cb3b Translate the shortcode for instance unsubscribe link
The [link:subscription_instant_unsubscribe_url] shown on
stats page was not translated

[MAILPOET-4862]
2022-12-07 10:52:07 +01:00
9036b210a0 Add test for click stat recording for 1-click
[MAILPOET-4862]
2022-12-07 10:52:07 +01:00
f337ac388b Fix wrong assertions in PagesTest
[MAILPOET-4862]
2022-12-07 10:52:07 +01:00
b0ae21ec60 Record click stat for 1-click unsubscribe
[MAILPOET-4862]
2022-12-07 10:52:07 +01:00
7d11eeeddd Add triggering of the actionScheduler
[MAILPOET-4899]
2022-12-07 07:42:03 +01:00
4577ca5476 Fix tests
[MAILPOET-3982]
2022-12-06 14:17:49 +01:00
846794b60d Improve Cron error message
This commit gives more context to the maximum execution limit error

[MAILPOET-3982]
2022-12-06 14:17:49 +01:00
5757af95aa Release 4.1.1 2022-12-06 13:04:01 +01:00
b8c3b38652 Skip SwitchingLanguagesCest on release branch
The test would fail because the translations packs are not ready
at the time when we prepare the release.
[MAILPOET-4863]
2022-12-05 12:02:15 +01:00
3d21e4f35e Increase retries when waiting for languages update to be available
[MAILPOET-4863]
2022-12-05 12:02:15 +01:00
73ce89d051 Mention both forms and emails when describing 3rd-party libraries and Google Fonts
[MAILPOET-4888]
2022-12-05 11:59:48 +01:00
49d9dd666b Fix coding styles issues in DisableMailFunctionNotice
[MAILPOET-4760]
2022-12-05 11:59:16 +01:00
53dda33c02 Update method and constant name
MAILPOET-4760
2022-12-05 10:25:28 +01:00
9b9f61bf13 Only queue test mail for sending when the mailpoet sending method is updated
MAILPOET-4760
2022-12-05 10:25:28 +01:00
651e2d3c56 Update tests and refactor method name
MAILPOET-4760
2022-12-05 10:25:28 +01:00
0bd627d3b1 Add support for checking misconfiguration of the PHP mail function
Some hosts do perform intentional misconfiguration of the mail function, causing it not to work.

When the mail function is misconfigured, we can still access and execute the mail function from within the codebase, but we get an error.

There’s no accurate way to know the PHP mail function is misconfigured. Unless we execute the function with all the proper parameters and check the exception error message against this error `Could not instantiate mail function.`

MAILPOET-4760
2022-12-05 10:25:28 +01:00
99d0eede80 Add tests for DisabledMailFunctionNotice
MAILPOET-4760
2022-12-05 10:25:28 +01:00
d09b4ca409 Add check for mail function and display notice if disabled
MAILPOET-4760
2022-12-05 10:25:28 +01:00
caa76983e4 Ensure action scheduler jobs are done
[MAILPOET-4864]
2022-12-02 14:58:48 +01:00
7b6bbb0bc3 Remove unnecessary integration test job for woo
After the release of HPOS we no longer need to install the special Woo build and
that caused that integration_test_woocommerce job and integration_test_woo_cot_off job
have completely same configuration.
This commit removes one of those job.
[MAILPOET-4880]
2022-12-01 12:20:42 -03:00
cdf7c81a94 Remove unnecessary acceptance_tests_woo_cot_off job
The same set of tests run within acceptance_tests_base_and_woo_cot_off job
[MAILPOET-4880]
2022-12-01 12:20:42 -03:00
86812c5259 Rename acceptance test job to contain info about HPOS configuration
[MAILPOET-4880]
2022-12-01 12:20:42 -03:00
657302b720 Simplify <Tags> component and add wrapper components
[MAILPOET-4628]
2022-12-01 13:36:18 +01:00
172b5215d2 Fix strict types definition spacing
[MAILPOET-4879]
2022-11-30 12:39:19 +01:00
52a9d9f76c Remove redundant name from package.json 2022-11-30 12:30:52 +01:00
8eb7a48d3e Fix display of Text option in the editor sidebar
[MAILPOET-4808]
2022-11-30 12:30:52 +01:00
a8bceffc9c Add forgotten strict_types to Homepage page class
[MAILPOET-4824]
2022-11-30 11:42:41 +01:00
2c728c793a Redirect to main page instead of emails page from logo and after reinstall
[MAILPOET-4824]
2022-11-30 11:42:41 +01:00
8d974d8147 Add mainPageSlug to MailPoet module
In some places we hardcode emails page as the main page.
This property is meant to be used in places where we want to link
to main plugin page so that the links change when homepage is active
[MAILPOET-4824]
2022-11-30 11:42:41 +01:00
8fbc5c270a Place home at the first position in submenu
[MAILPOET-4824]
2022-11-30 11:42:41 +01:00
92dc5921df Set main page to homepage in case the feature is active
[MAILPOET-4824]
2022-11-30 11:42:41 +01:00
3c3ce37720 Temporarily add static property for MAIN_PAGE_SLUG
We need to be able to change it when homepage feature is active.
When we remove the feature flag will switch back to using constant.
Note I also kept the constant in case a third party plugin uses it.
[MAILPOET-4824]
2022-11-30 11:42:41 +01:00
f369e399ed Distinguish main page and emails page
There are some cases where we link or redirect to main page but
actually we want to redirect to emails page. It happens that currently they are
the same page, but we need to distinguish these cases for the future when
we switch the main page to new homepage.
[MAILPOET-4824]
2022-11-30 11:42:41 +01:00
01aa1e1e52 Refactor page slugs into constants
[MAILPOET-4824]
2022-11-30 11:42:41 +01:00
2bbc1b7063 Add homepage page and submenu item hidden behind feature flag
[MAILPOET-4824]
2022-11-30 11:42:41 +01:00
04b8a0ed73 Add feature flag for homepage
[MAILPOET-4824]
2022-11-30 11:42:41 +01:00
761f7c6537 Prevent issues if other plugins define WC function
It's possible that other plugins might define wc_get_page_id, so it's
more important to know that WC is installed/active than to know if the
function itself exists.

For good measure I'm including a cast to int even though the WC version
of the function always returns an integer. This is probably unnecessary
but it protects us from the possibility of the WC version of the
function returning something other than an integer in the future.

[MAILPOET-4834]
2022-11-30 11:03:40 +01:00
723dc2c9d3 Fix type errors in tests
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
d66fbb1c20 Fix confirmed IP value in tests
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
c2107b8d59 Enable strict types rule for all files
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
926620e8f8 Ignore strict types rule in all existing files that don't have it
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
82aeb89854 Use strict types in tests
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
c67c58709b Unify spacing of declare statements
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
75b5958a53 Release 4.1.0 2022-11-29 13:56:02 +01:00
bba5101669 Replace switching groups' tab by a new function
[MAILPOET-4861]
2022-11-29 10:58:11 +01:00
b9c5dddbaf Try switch group multiple times
[MAILPOET-4861]
2022-11-29 10:58:11 +01:00
0566b3f5fa Fix remaining code style issues
[MAILPOET-4850]
2022-11-28 22:24:54 +01:00
ac4adac1ab Fix test class name
[MAILPOET-4850]
2022-11-28 22:24:54 +01:00
33a9097719 Fix trim(null) issue
[MAILPOET-4850]
2022-11-28 22:54:13 +03:00
08c74cdf8b Fix SlevomatCodingStandard.Namespaces.UnusedUses.MismatchingCaseSensitivity
[MAILPOET-4850]
2022-11-28 22:54:13 +03:00
8c5222d850 Fix WordPress.Security.ValidatedSanitizedInput.InputNotSanitized and related errors
[MAILPOET-4850]
2022-11-28 22:54:13 +03:00
08c76a46af Fix Squiz.Classes.ClassFileName.NoMatch and related errors
[MAILPOET-4850]
2022-11-28 22:54:13 +03:00
3d24cb1deb Fix Generic.Classes.DuplicateClassName.Found
[MAILPOET-4850]
2022-11-28 22:54:13 +03:00
a151f93be1 Fix Generic.CodeAnalysis.JumbledIncrementer.Found
[MAILPOET-4850]
2022-11-28 22:54:13 +03:00
bce6a06c15 Fix Sniffs.ControlSignature.Found
[MAILPOET-4850]
2022-11-28 22:54:13 +03:00
10a6e387f3 Fix Squiz.Scope.MethodScope.Missing
[MAILPOET-4850]
2022-11-28 22:54:13 +03:00
b6a37f274c Fix Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
[MAILPOET-4850]
2022-11-28 22:54:13 +03:00
2cdbc68643 Fix Squiz.Classes.ValidClassName.NotCamelCaps
[MAILPOET-4850]
2022-11-28 22:54:13 +03:00
7db40b27b5 Fix errors automatically with phpcbf
[MAILPOET-4850]
2022-11-28 22:54:13 +03:00
b1760ff676 Add MinimalPluginStandard to lint-staged command
[MAILPOET-4850]
2022-11-28 22:54:13 +03:00
293eef2c78 Add MinimalPluginStandard to Robofile
./do qa:minimal-plugin-standard will not execute the MinimalPluginStandard phpcs sniffs
./do qa:php has been extended to include the sniffs as well

[MAILPOET-4850]
2022-11-28 22:54:13 +03:00
299c6b779e Remove MinimalPluginStandard from ruleset
[MAILPOET-4850]
2022-11-28 22:54:13 +03:00
842f435976 Add default value for method to StatisticsUnsubscribeEntity
When entity is created the default value is not set and it may causes
failures when it is not set additionally.
This commit sets default value and also defines a constant for the default value.
[PREMIUM-211]
2022-11-28 18:21:52 +01:00
11faf925cc Refactor time assertions in AutomaticEmailTest to use assert with delta
Carbon:setTestNow was not working because we are instantiating the new Carbon instance with value.
This commit updates all DateTime assertions to use the new assertEqualDateTimes method
[MAILPOET-4867]
2022-11-28 14:19:30 +01:00
1295aa21cc Skip congratulatory email if we know it will fail
[MAILPOET-4641]
2022-11-28 14:12:50 +01:00
84cd137c76 Don't switch to MSS when activating key without sending
[MAILPOET-4641]
2022-11-28 14:12:50 +01:00
37067dff67 Add state to MSS key check response
[MAILPOET-4641]
2022-11-28 14:12:50 +01:00
c7f850e1ba Declare strict types
[MAILPOET-4842]
2022-11-28 13:03:06 +01:00
b25f2cd5f4 Enable a Trigger to activate a second automation
[MAILPOET-4842]
2022-11-28 13:03:06 +01:00
af95080b67 Add test for TriggerHandler
[MAILPOET-4842]
2022-11-28 13:03:06 +01:00
6b8c35d5fe Fix Manage Sender Domain modal hides underneath Preview newsletter modal
MAILPOET-4812
2022-11-28 12:14:52 +01:00
a35e0dced4 Accept null opt-in values for in Woo Blocks integration
[MAILPOET-4804]
2022-11-28 11:51:27 +01:00
c6259eb185 Create acceptance test container upfront with one retry
This is and attempt to fix random issue with
Error response from daemon: Conflict. The container name "/wordpress_X" is already in use
[MAILPOET-4851]
2022-11-28 09:14:56 +01:00
670017b342 Update nesbot/carbon to the latest version
This is needed for MailPoet to work well with the upcoming PHP 8.2.

nesbot/carbon versions previous to 2.62.1 could cause issues when used
with PHP 8.2, see this PR for more information:
https://github.com/briannesbitt/Carbon/pull/2663

Without this update MailPoet users will see the following fatal error
when using PHP 8.2:

```
TypeError
MailPoetVendor\Carbon\Carbon::setLastErrors(): Argument #1 ($lastErrors) must be of type array, bool given, called in /srv/www/mp/public_html/wp-content/plugins/mailpoet/vendor-prefixed/nesbot/carbon/src/Carbon/Traits/Creator.php on line 567
```

[MAILPOET-4838]
2022-11-26 09:38:05 +01:00
ce7b210da9 Bump tested up to
[MAILPOET-4841]
2022-11-26 09:09:00 +01:00
1a2d8b8d40 Add saving nicename for created WP users
[MAILPOET-4841]
2022-11-26 09:09:00 +01:00
fe2df00a8c Use the latest WP version as default for acceptance tests
[MAILPOET-4841]
2022-11-26 09:09:00 +01:00
20577d974f Replace custom createSubscriber method with common factory method
[MAILPOET-4860]
2022-11-25 17:17:48 +01:00
7369465a3a Add subscribers cleanup to stats notification worker test
The test creates subscribers and there was not cleanup so this was increasing
probability of conflict in subscribers email.
[MAILPOET-4860]
2022-11-25 17:17:48 +01:00
5769fa45f5 Use helper methods for method column migration
This fixes issues with MailPoet in multiple schemas on the same MySQL instance as well
as simplifies the code. The migration was also renamed to a newer date. Additionally, the
edit of the initial MailPoet migration was reverted as this is not needed.

[MAILPOET-4733]
2022-11-25 14:51:57 +01:00
193b4cbf98 Set missing unsubscribe method for failing tests
[MAILPOET-4733]
2022-11-25 14:51:57 +01:00
461df1a560 Adjust strict_types & method typehint based on PR feedback
[MAILPOET-4733]
2022-11-25 14:51:57 +01:00
d5f78680eb Add integration test for unsubscibe properties
[MAILPOET-4733]
2022-11-25 14:51:57 +01:00
96dde7107b Expose unsubscribe analytics properperties
[MAILPOET-4733]
2022-11-25 14:51:57 +01:00
3e756bfadd Add test to assert correct unsubscription method is saved
[MAILPOET-4733]
2022-11-25 14:51:57 +01:00
82c755200e Augment track persister test with method as meta
[MAILPOET-4733]
2022-11-25 14:51:57 +01:00
735d33d05b Add method of tracking when tracking unsubscriptions
[MAILPOET-4733]
2022-11-25 14:51:57 +01:00
90c8e5b2c9 Introduce method column to statistics_unsubscribes table
[MAILPOET-4733]
2022-11-25 14:51:57 +01:00
cd1f06b116 Forbid assert() in code base
[MAILPOET-4258]
2022-11-25 14:32:34 +01:00
173f347431 Fix assert in Helper
[MAILPOET-4258]
2022-11-25 14:32:34 +01:00
353d3389cd Fix assert in data factories
[MAILPOET-4258]
2022-11-25 14:32:34 +01:00
fe364978a1 Fix usage of assert in acceptance tests
[MAILPOET-4258]
2022-11-25 14:32:34 +01:00
cd512bbb01 Fix instanceOf assertions in unit tests
[MAILPOET-4258]
2022-11-25 14:32:34 +01:00
f5193df721 Fix not null assertions in integration tests
[MAILPOET-4258]
2022-11-25 14:32:34 +01:00
25b5d24867 Fix is_array assertion in integration tests
[MAILPOET-4258]
2022-11-25 14:32:34 +01:00
1d99ff0943 Fix all is_string assertions in integration tests
[MAILPOET-4258]
2022-11-25 14:32:34 +01:00
99d6d96b05 Fix all is_numeric asserts in integration tests
[MAILPOET-4258]
2022-11-25 14:32:34 +01:00
6ddfe2c605 Remove ignores no longer needed
[MAILPOET-4258]
2022-11-25 14:32:34 +01:00
d2ec7bba42 Replace instance_of asserts in integration tests
[MAILPOET-4258]
2022-11-25 14:32:34 +01:00
2557171953 Fix assert() in lib
[MAILPOET-4258]
2022-11-25 14:32:34 +01:00
0d7e45ea03 Fix filename that is removed by fix-monolog.php
The following error is being thrown when running composer commands:

```
> php fix-monolog.php
rm: cannot remove 'mailpoet/mailpoet/prefixer/../vendor-prefixed/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php': No such file or directory
```

This is happening because in commit 9b71a7804c
we updated Monolog from v1 to v2. v2 renamed the file ElasticSearchHandler.php
to ElasticsearchHandler.php (see
4c7795d310).
Note that search is not spelled with a capital S anymore. We didn’t update
fix-monolog.php to reflect this change.

This commit updates fix-monolog.php to use the new file name and to remove
the error.

[MAILPOET-4856]
2022-11-25 13:47:24 +01:00
e677169a51 Update Mysql image for integration and acceptance tests
[MAILPOET-4851]
2022-11-25 13:37:08 +01:00
e268eac378 Add healthcheck for mysql service in the test environment
This is replacement for custom wait scripts and also should ensure
that DB is ready before starting the wordpress serive container,
which was missing the check.
[MAILPOET-4851]
2022-11-25 13:37:08 +01:00
375f2b13c5 Try select option in select 2 multiple times
[MAILPOET-4555]
2022-11-25 13:21:42 +01:00
34406a2f72 Fix flaky WooCommercePurchaseTest
[MAILPOET-4854]
2022-11-25 13:10:30 +01:00
cc658bcc3d Split one big test case into three smaller
[MAILPOET-4846]
2022-11-25 13:04:46 +01:00
973aefe7ae Hide black Friday notice in acceptance tests
[MAILPOET-4846]
2022-11-25 13:04:46 +01:00
34e91251e8 Add waiting on clickable trash button
[MAILPOET-4846]
2022-11-25 13:04:46 +01:00
882402645d Do not wrap automations beta badge, make it a bit smaller
[MAILPOET-4840]
2022-11-25 09:55:11 +01:00
d9d4dccc09 Make instruction on how to test with different PHP versions more generic
This commit just updates the README file so that it doesn't mention
specific PHP versions. This way we don't have to update it every time we
add a new version to the dev environment.

[MAILPOET-4855]
2022-11-25 09:33:39 +01:00
9d2fcccbf5 Add option to run the dev env with PHP 8.2RC6
[MAILPOET-4855]
2022-11-25 09:33:39 +01:00
c4fdd881e6 Retry language updates if they are not scheduled yet
[MAILPOET-4849]
2022-11-24 16:58:18 +01:00
83f7eee8ae Early return to make the migration idempotent
[MAILPOET-4852]
2022-11-24 16:04:29 +01:00
dc1f63d8bb Rename segments migration to be executed again
[MAILPOET-4852]
2022-11-24 16:04:29 +01:00
3e2425abd8 Rewrite segments migration to use helper methods, Doctrine DBAL, and lower number of queries
[MAILPOET-4852]
2022-11-24 16:04:29 +01:00
65e78c7990 Add helper to determine whether a column exists
[MAILPOET-4852]
2022-11-24 16:04:29 +01:00
2bdc5d3683 Add helper to get current table name
[MAILPOET-4852]
2022-11-24 16:04:29 +01:00
1de276378f Use different container names for different parallel runs
[MAILPOET-4851]
2022-11-24 15:48:43 +01:00
cc76fe77f0 Ensure that docker caching on CircleCi is disabled
[MAILPOET-4851]
2022-11-24 13:29:20 +01:00
c8636aac6f Update selenium and chrome image
[MAILPOET-4848]
2022-11-24 10:34:59 +01:00
a09f41143e Update codeception, webdriver and lucatume/browser
[MAILPOET-4848]
2022-11-24 10:34:59 +01:00
8b29694446 Compare scheduledAt with delta 2022-11-24 10:06:59 +01:00
5e0e89408c Test CaptchaFormRenderer
[MAILPOET-4203]
2022-11-24 09:20:39 +01:00
86076547c3 Raise aria-live level
[MAILPOET-4203]
2022-11-24 09:20:39 +01:00
b1bbabe14d early return when no audioCaptcha element was found
[MAILPOET-4203]
2022-11-24 09:20:39 +01:00
f5c678ec2d Initialize session when no ID exists
[MAILPOET-4514]
2022-11-24 09:20:39 +01:00
223625bd9b Use constant for endpoint
[MAILPOET-4514]
2022-11-24 09:20:39 +01:00
fbd7cf8cc7 Use SubscriberEntity instead of the Model
[MAILPOET-4514]
2022-11-24 09:20:39 +01:00
26c7e4d1cc Use null instead of empty string
[MAILPOET-4514]
2022-11-24 09:20:39 +01:00
4832771185 Refactor the captcha system
The current Captcha class has a lot of responsibilities. It renders the captcha
image, can check if a certain captcha type is a Google captcha, if a captcha is
required for a certain email. The SubscriberSubscribeController is not only in
charge of "controlling" the subscription process but also validates, whether a
captcha is correct or not. This architecture made it difficult to extend the
functionality and introduce the audio captcha feature.

Therefore this commit refactors the captcha architecture and tries to seperate
the different concerns into several classes and objects. Validation is now done
by validators.

The CaptchaPhrase now is in charge of keeping the captcha phrase consistent
between the image and the new audio, so that you can renew the captcha and both
captchas are in sync.

[MAILPOET-4514]
2022-11-24 09:20:39 +01:00
7fb8d64628 Rename CaptchaRenderer to CaptchaFormRenderer
[MAILPOET-4203]
2022-11-24 09:20:39 +01:00
36fed3bbf8 Enable output of audio captcha when image captcha has not yet been generated
[MAILPOET-4203]
2022-11-24 09:20:39 +01:00
8ab738b315 Use classes instead of ids for captcha elements
[MAILPOET-4203]
2022-11-24 09:20:39 +01:00
b84b9606e9 Remove type residual from audio captcha url building
[MAILPOET-4203]
2022-11-24 09:20:39 +01:00
aa68b7e148 Bust caching when building the audio captcha url
[MAILPOET-4203]
2022-11-24 09:20:39 +01:00
ca44339512 Fix typo in button cursor property
[MAILPOET-4203]
2022-11-24 09:20:39 +01:00
91f5376dfc Apply prettier
[MAILPOET-4203]
2022-11-24 09:20:39 +01:00
d51ef70db6 Add audio assets
[MAILPOET-4203]
2022-11-24 09:20:39 +01:00
c164268c20 Change file name to lower case
and codestyle
[MAILPOET-4203]
2022-11-24 09:20:39 +01:00
4c7c94c75d Update JavaScript for captcha audio player
[MAILPOET-4203]
2022-11-24 09:20:39 +01:00
ccf141b279 Add button icons
[MAILPOET-4203]
2022-11-24 09:20:39 +01:00
e42808f22d Update Captcha UI to add audio button
[MAILPOET-4203]
2022-11-24 09:20:39 +01:00
75a4b2c538 Add Captcha Audio endpoint to Router
[MAILPOET-4203]
2022-11-24 09:20:39 +01:00
f1d64c0572 Add Captcha styles
[MAILPOET-4203]
2022-11-24 09:20:39 +01:00
25c57bf9fe Fix flaky acceptance test for tag filter
[MAILPOET-4844]
2022-11-23 16:38:49 +01:00
079c90dbba Add acceptance test for switching languages
[MAILPOET-4147]
2022-11-23 12:50:32 +01:00
0fc342ee4c Release 4.0.1 2022-11-22 13:57:46 +01:00
7570c9fa0e Make automations Beta badge smaller
[MAILPOET-4836]
2022-11-22 09:23:57 +01:00
7642c4da4f Update machine executor images
[MAILPOET-4833]
2022-11-21 16:06:58 -03:00
dce13e5b8e Update sentence, add full stop.
MAILPOET-4669
2022-11-21 15:21:29 +01:00
8b922681b6 Use boolean instead of integer for displayInManageSubscriptionPage column
MAILPOET-4669
2022-11-21 15:21:29 +01:00
bd33cdbc24 Add new migration file for DisplayInManageSubscriptionPage column
MAILPOET-4669
2022-11-21 15:21:29 +01:00
bc04ad2528 Enable default checked state for standard lists checkbox
MAILPOET-4669
2022-11-21 15:21:29 +01:00
c54a5213b3 Update tests
MAILPOET-4669
2022-11-21 15:21:29 +01:00
07cf0cd79b Remove list management from settings page
MAILPOET-4669
2022-11-21 15:21:29 +01:00
e64dc1669f Add support for segment displayInManageSubscriptionPage on Subscription management page
MAILPOET-4669
2022-11-21 15:21:29 +01:00
48181994d8 Handle saving and loading list page. Add support for showInManageSubscriptionPage checkbox input
MAILPOET-4669
2022-11-21 15:21:29 +01:00
31c2915075 Add showInManageSubscriptionPage checkbox to edit list page
MAILPOET-4669
2022-11-21 15:21:29 +01:00
67f05ecfe2 Prefix forgotten Twig call in generated template code
[MAILPOET-4718]
2022-11-21 12:47:19 +01:00
c121c60e8c Fix condition for the running status
[MAILPOET-4664]
2022-11-21 12:45:28 +01:00
110859508e Fix tasks order on the status page
[MAILPOET-4664]
2022-11-21 12:45:28 +01:00
efd3377ecd Fix count of tasks on the status page
[MAILPOET-4664]
2022-11-21 12:45:28 +01:00
a7c1d8431d Update tests for [subscriber:count] shortcode
MAILPOET-4527
2022-11-21 12:36:12 +01:00
127f3e6363 Fix [subscriber:count] counts only subscribed subscribers
MAILPOET-4527
2022-11-21 12:36:12 +01:00
6bec12c762 Use helper function to create migration tables
[MAILPOET-4835]
2022-11-21 12:15:10 +01:00
d1df2d4f42 Add a helper function to create new table
[MAILPOET-4835]
2022-11-21 12:15:10 +01:00
5598f0af19 Fixing small typo
Automatoin should be automation
2022-11-21 11:23:01 +01:00
8dd80ce0f2 Fix the circle rerun command output
[PREMIUM-207]
2022-11-18 16:05:18 +01:00
e45510e064 Add rerunning premium workflow into the prepare command
[PREMIUM-207]
2022-11-18 16:05:18 +01:00
bfafff132a Make the project parameter optional
[PREMIUM-207]
2022-11-18 16:05:18 +01:00
d6748fe979 Add command for rerunning circle workflow
[PREMIUM-207]
2022-11-18 16:05:18 +01:00
2169522818 Add methods for rerunning Circle workflow
[PREMIUM-207]
2022-11-18 16:05:18 +01:00
06cfa3fc60 Shorten test and run action-scheduler group
[MAILPOET-4746]
2022-11-17 22:25:52 +01:00
f9e507eb15 Use latest WooCommerce version for Woo HPOS related tests
Before WooCommerce 7.1.0 was released, we were defining a specific
version of Woo that included HPOS to be used when running HPOS related
tests. Now that 7.1.0 was released and since we started using it by
default in bd51822b961a6f8ad10d3454cde912917acac0b6, we don't need to
specify a different Woo version for the HPOS tests.

[MAILPOET-4801]
2022-11-17 14:55:38 +01:00
90332a23b3 Use latest WooCommerce version in the CircleCI jobs
[MAILPOET-4801]
2022-11-17 14:55:38 +01:00
a82a810269 Update form templates to include privacy page link (if found)
MAILPOET-4651
2022-11-16 16:51:12 +01:00
5a378b3c5f Add replacePrivacyLinkTags method for Form Template
MAILPOET-4651
2022-11-16 16:51:12 +01:00
49a2df3dbb Release 4.0.0 2022-11-16 09:43:17 +01:00
dee5ff38f5 Fix error when sending a preview email with MSS
With HTTPS and "$oneClickUnsubscribeUrl = false", we were sending "false" instead of an actual URL.

[MAILPOET-4813]
2022-11-15 15:05:03 +01:00
70aefb421b Clear error when rerunning migration
[MAILPOET-4811]
2022-11-14 20:12:35 +03:00
764e1a1bf0 Rename "Not active" state to "Draft" on automations listing page
[MAILPOET-4810]
2022-11-14 19:51:34 +03:00
b140011f92 Update minimal version check for WooCommerceCheckoutBlockCest
Since we support the Woo Blocks integration only for versions from 8.0.0
we need to update minimal version check code for acceptance test.
[MAILPOET-4668]
2022-11-14 17:20:43 +01:00
b48c9e437e Update plugins in tests for feature and trunk branches
[MAILPOET-4668]
2022-11-14 17:20:43 +01:00
f34efb4d6f Update acceptance test oldest job configuration
[MAILPOET-4668]
2022-11-14 17:20:43 +01:00
324c03e8b9 Print WordPress version when starting test environment
[MAILPOET-4668]
2022-11-14 17:20:43 +01:00
e718101425 Upgrade minimum required WordPress version to 5.8
[MAILPOET-4668]
2022-11-14 17:20:43 +01:00
080ce50fea Open automations Beacon links in a new tab instead of HelpScout Beacon
[MAILPOET-4809]
2022-11-14 18:53:20 +03:00
1b9eb223b0 Load templates late
[MAILPOET-4788]
2022-11-14 12:35:29 +02:00
ea2fa794ac Limit varchar length to 191 to avoid unique/primary key issues
[MAILPOET-4788]
2022-11-14 12:35:29 +02:00
c46c61a923 Simplify and optimize automation stats
[MAILPOET-4788]
2022-11-14 12:35:29 +02:00
1136431551 Use $wpdb->prepare() for automation stats
[MAILPOET-4788]
2022-11-14 12:35:29 +02:00
957be23212 Improve query formatting
[MAILPOET-4788]
2022-11-14 12:35:29 +02:00
91a88b3e91 Rename alias "w" to "a"
[MAILPOET-4788]
2022-11-14 12:35:29 +02:00
7c5d239267 Fix and unify cleanup in automation tests
[MAILPOET-4788]
2022-11-14 12:35:29 +02:00
c748b80447 Fix timestamp column problems with some MySQL versions and some SQL modes
[MAILPOET-4788]
2022-11-14 12:35:29 +02:00
725e0ecb00 Remove automation feature flag
[MAILPOET-4788]
2022-11-14 12:35:29 +02:00
eb71dd8a68 Remove automation testing buttons and hooks
[MAILPOET-4788]
2022-11-14 12:35:29 +02:00
ce1687cf97 Replace custom mutation hook with a @wordpress/api-fetch based one
[MAILPOET-4788]
2022-11-14 12:35:29 +02:00
2e328b6d7f Move temporary automation migrator to a new migration
[MAILPOET-4788]
2022-11-14 12:35:29 +02:00
8489e63d34 Delete automation testing system endpoints
[MAILPOET-4788]
2022-11-14 12:35:29 +02:00
f8c17730fc Update tracking campaign
[MAILPOET-4712]
2022-11-14 11:22:57 +01:00
93e43eee7a Update sales banner for Black Friday 2022
[MAILPOET-4712]
2022-11-14 11:22:57 +01:00
9063dc3079 Remove duplicities in naming
[MAILPOET-4793]
2022-11-14 12:14:35 +02:00
9d55d3f134 Use "automation" instead of "workflow"
[MAILPOET-4793]
2022-11-14 12:14:35 +02:00
d199c3768a Show Bounced and Unsubscribed badge for minimum of 100 newsletter sent
The reason is that at low volumes the percentages can be misleading. E.g. if you send 20 emails and 1 hard bounces - that’s a hard bounce rate of 5%.

The percentage is very high, but a single hard bounce doesn’t really mean anything, so to avoid confusion I’d hide the badge altogether for low volumes.

MAILPOET-4688
2022-11-14 10:47:04 +01:00
0e0c2447d9 Fix issue with badge stats
We were using MailPoet.Num.toLocaleFixed which returns a string locale of the number. This can cause issues with some locales e.g some locale returns 2,3 instead of 2.3

MAILPOET-4688
2022-11-14 10:47:04 +01:00
99dfb3d24b Add formatForStats method for Unsubscribed and Bounced Stats
MAILPOET-4688
2022-11-14 10:47:04 +01:00
c4366e009b Fix crashing page due to newsletter not found error
MAILPOET-4688
2022-11-14 10:47:04 +01:00
1d31202607 Add badge for Unsubscribe, bounced and opened stat to the Advanced email statistics page
MAILPOET-4688
2022-11-14 10:47:04 +01:00
78d25ffb69 Add Stats Badge for opened rate on email listing
MAILPOET-4688
2022-11-14 10:47:04 +01:00
b710682c66 Replace average with critical badge on email listing for opened and clicked stats
MAILPOET-4688
2022-11-14 10:47:04 +01:00
52c6b94315 Add support for critical tag in newsletter badge
MAILPOET-4688
2022-11-14 10:47:04 +01:00
fd6b49e598 Add type TagVariant for variant strings
MAILPOET-4688
2022-11-14 10:47:04 +01:00
df2982454e Add support for Critical Tag and critical tag color
MAILPOET-4688
2022-11-14 10:47:04 +01:00
8a19fd906f Update test to check for distinct one-click urls in bulk
[MAILPOET-4703]
2022-11-11 09:21:30 +01:00
99198e5c2d Fix MailPoet\WP\Functions newly added method name
[MAILPOET-4703]
2022-11-11 09:21:30 +01:00
9204f37560 Remove redundant injection
[MAILPOET-4703]
2022-11-11 09:21:30 +01:00
765aa6efab Augment tests to acknowledge oneclick unsubscribe url
[MAILPOET-4703]
2022-11-11 09:21:30 +01:00
50b613365f Make sure one-click unsubscribe url won't redirect internally
[MAILPOET-4703]
2022-11-11 09:21:30 +01:00
4fe8d10d6c Update tests for Subscription and pass the new argument
[MAILPOET-4703]
2022-11-11 09:21:30 +01:00
162dab790d Implement 1-click unsubscribe strategy for post requests
[MAILPOET-4703]
2022-11-11 09:21:30 +01:00
6e8c9731d8 Define new isSiteUsingHttps method for WP_Functions
[MAILPOET-4703]
2022-11-11 09:21:30 +01:00
235552f91d Define Request utility class with isPost method
[MAILPOET-4703]
2022-11-11 09:21:30 +01:00
4ee08c296b Fix unknown storage engine 'InnoDB' error
[MAILPOET-4802]
2022-11-10 12:59:24 +01:00
bda979ec4f Fix trash error when workflow status is draft
[MAILPOET-4792]
2022-11-09 19:58:44 +03:00
78f10f064e Fix clicking on no longer existing text
[MAILPOET-4796]
2022-11-09 15:58:36 +01:00
eca4a68fec Revert broken test fix
Reverts: https://github.com/mailpoet/mailpoet/pull/4511

[MAILPOET-4796]
2022-11-09 15:58:36 +01:00
9daa5d58c7 Adjust tests to new templates
[MAILPOET-4745]
2022-11-09 15:24:50 +03:00
6cc232fbad Make premium badge mailpoet orange
[MAILPOET-4745]
2022-11-09 15:24:50 +03:00
6a07bd44ff Improve 'Coming soon' styles
[MAILPOET-4745]
2022-11-09 15:24:50 +03:00
63cd326191 Update template descriptions
[MAILPOET-4745]
2022-11-09 15:24:50 +03:00
40b15b0eb1 Lower the grid size for the badge
[MAILPOET-4745]
2022-11-09 15:24:50 +03:00
3825e9cb11 Fix test
[MAILPOET-4745]
2022-11-09 15:24:50 +03:00
7db2942140 Show PremiumModal for premium templates
[MAILPOET-4745]
2022-11-09 15:24:50 +03:00
3a5d28f24a Export const premiumValidAndActive
[MAILPOET-4745]
2022-11-09 15:24:50 +03:00
d02c63844d Add badges to template items
[MAILPOET-4745]
2022-11-09 15:24:50 +03:00
c3045dba07 Add type to WorkflowTemplate definition
[MAILPOET-4745]
2022-11-09 15:24:50 +03:00
c239566e1e Add premium and coming-soon template stubs
[MAILPOET-4745]
2022-11-09 15:24:50 +03:00
dfdc8cfd09 Add WorkflowTemplate types
[MAILPOET-4745]
2022-11-09 15:24:50 +03:00
4977b7ffa2 Add free templates
[MAILPOET-4745]
2022-11-09 15:24:50 +03:00
8e69299a6a Adjust naming and use wp wrapper I/O of direct usage
[MAILPOET-4702]
2022-11-09 12:36:44 +01:00
903bcbb92e Update tests and adapt to the new unsubscribe key structure
[MAILPOET-4702]
2022-11-09 12:36:44 +01:00
8d6492ac8c Adjust constructor injections of instantiators of MailPoet
[MAILPOET-4702]
2022-11-09 12:36:44 +01:00
c39ae1fe1f Adjust the unsubscribe key to use the new structure
[MAILPOET-4702]
2022-11-09 12:36:44 +01:00
e3539b06a2 Define URL utility method to check if url is using https
[MAILPOET-4702]
2022-11-09 12:36:44 +01:00
d34a265ac2 Prevent leaving unsaved automation
[MAILPOET-4776]
2022-11-09 13:42:56 +03:00
9a72e361b1 Fix plugin activtion for the smtp plugin
[MAILPOET-4785]
2022-11-09 12:59:29 +03:00
a520e4bd93 Run full activation of user account on multisite
[MAILPOET-4785]
2022-11-09 12:59:29 +03:00
9ab6ebbe0d Use always SMTP to send wp_mail
[MAILPOET-4785]
2022-11-09 12:59:29 +03:00
6a3cfd05e7 Update CircleCI to wait for Woo jobs to complete before starting build_release_zip
In [MAILPOET-4572] we added new CircleCI jobs to run WooCommerce tests in
different scenarios. But we forgot to add those jobs to the list of jobs
that need to finish before starting the build_release_zip job.

This can be problematic as we don’t want the build_release_zip to start
before all the test jobs have finished and, even worst, we don’t want it
to run if one of the test jobs failed.

This commit adds the following jobs to the list of jobs that are
required to finish before running build_release_zip:

- integration_test_woo_cot_no_sync
- integration_test_woo_cot_off
- integration_test_woo_cot_sync
- acceptance_tests_woo_cot_sync
- acceptance_tests_woo_cot_off
- acceptance_tests_woo_cot_no_sync

[MAILPOET-4791]
2022-11-09 09:07:21 +01:00
f825e535e3 Save next step in trigger handler
[MAILPOET-4787]
2022-11-08 22:55:57 +02:00
a2c5420d7f Save updated at timestamp in workflow runs
[MAILPOET-4787]
2022-11-08 22:55:57 +02:00
c6d3573652 Save next step ID to workflow runs
[MAILPOET-4787]
2022-11-08 22:55:57 +02:00
e41bcd0d02 Manage ActivationPanel in store and close when sidebar opens
[MAILPOET-4769]
2022-11-08 23:31:36 +03:00
f805907954 Release 3.103.1 2022-11-08 17:35:04 +01:00
d970efc0da Reduce size of a database field to avoid error in some MySQL versions
This commit reduces the size of the `name` field from varchar(255) to
varchar(191) to avoid the following fatal error in some MySQL versions:

```
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
```

See the ticket descriptions and the links in it for more information.

[MAILPOET-4790]
2022-11-08 12:27:01 -03:00
c0ce5944dc Use short table aliases
[MAILPOET-4778]
2022-11-08 16:17:34 +02:00
467f354eb1 Do not skip workflow trigger queries when trigger keys are empty
[MAILPOET-4778]
2022-11-08 16:17:34 +02:00
3f016b45f9 Don't escape table names when not needed
[MAILPOET-4778]
2022-11-08 16:17:34 +02:00
679f74e498 Unify query error checking
[MAILPOET-4778]
2022-11-08 16:17:34 +02:00
08b314e0b4 Unify table variable naming
[MAILPOET-4778]
2022-11-08 16:17:34 +02:00
cc5959805b Use "workflow_triggers" table instead of an inline JSON
[MAILPOET-4778]
2022-11-08 16:17:34 +02:00
407f3d1609 Hide duplicate workflow button
[MAILPOET-4786]
2022-11-08 16:48:35 +03:00
503df3584c Track errors
[MAILPOET-4756]
2022-11-08 16:41:47 +03:00
fa9510f0c1 Add getStepById method
[MAILPOET-4756]
2022-11-08 16:41:47 +03:00
cc92df4e7f Track Automations > Listing viewed event
[MAILPOET-4756]
2022-11-08 16:41:47 +03:00
d76c5d32f2 Track Workflow deactivated
[MAILPOET-4756]
2022-11-08 16:41:47 +03:00
c6198cba4c Track Workflow activated
[MAILPOET-4756]
2022-11-08 16:41:47 +03:00
e29dd4286e Track template selected
[MAILPOET-4756]
2022-11-08 16:41:47 +03:00
98c1c33341 Release 3.103.0 2022-11-08 10:33:23 -03:00
78cc8743d5 Skip tests that are failing to unblock a release preparation
Those two tests that are failing are related to the automation feature
which is not yet available to the users. So skipping them should be
safe.

[MAILPOET-4784]
2022-11-07 23:42:16 +03:00
89e75b3828 Make test passable for both multi-side and single 2022-11-07 15:16:44 -03:00
982d104ba0 Fix the issue in test dot instead plus [MAILPOET-4782]
[MAILPOET-4782]
2022-11-07 15:16:44 -03:00
2ce4461c63 Fix acceptance test UserRegistrationTriggered [MAILPOET-4782]
[MAILPOET-4782](https://mailpoet.atlassian.net/browse/MAILPOET-4782)
2022-11-07 15:16:44 -03:00
146a55b921 Improve stability of SchedulerTest by adding 1s delta to time comparisons
[MAILPOET-4780]
2022-11-07 19:15:43 +01:00
7e883d3e5b Rename method from checkForNullOrUndefined to isNullOrUndefined
MAILPOET-4681
2022-11-07 14:17:50 +01:00
7896efcd6c Enforce user selection for welcome wizard privacy and data sharing
We are making the two buttons mandatory. Users have to select either yes or no before they can proceed with the welcome wizard

MAILPOET-4681
2022-11-07 14:17:50 +01:00
a1ef87ef78 Remove later phrase from options
MAILPOET-4658
2022-11-07 12:42:58 +01:00
d058f1741f Add after text for immediately option on the post notification create screen.
MAILPOET-4658
2022-11-07 12:42:58 +01:00
ff0852fa39 Update after delay text
MAILPOET-4658
2022-11-07 12:42:58 +01:00
5f07b68b07 Update post notification emails
Remove select frequency subheader and add "after publishing a post" to immediately text

MAILPOET-4658
2022-11-07 12:42:58 +01:00
0c2934a556 Update Post notifications email setup
Add "When to send this post notification email" text to the page

MAILPOET-4658
2022-11-07 12:42:58 +01:00
885b51a6cf Update PurchasedInCategory and PurchasedProduct
Add "after purchase" text to the page

MAILPOET-4658
2022-11-07 12:42:58 +01:00
6cb5ceca21 Update First purchase automatic emails
Add "When to send this email" and "after first purchase" texts to the page

MAILPOET-4658
2022-11-07 12:42:58 +01:00
9a14ddb57c Fire mailpoet_segment_subscribed only when subscriber status changed
[MAILPOET-4773]
2022-11-07 04:41:47 -06:00
5c6f32488a Remove old hook
[MAILPOET-4773]
2022-11-07 04:41:47 -06:00
4ec8f27d36 Delete schema if necessary
[MAILPOET-4773]
2022-11-07 04:41:47 -06:00
9554727370 Fire mailpoet_segment_subscribed when user registers and is subscribed
When no confirmation mail gets send, the user is subscribed immediately. In this case
we need to fire the mailpoet_segment_subscribed action, so the trigger can listen to this
event.

[MAILPOET-4773]
2022-11-07 04:41:47 -06:00
394f9abd67 Make sure, we have a fresh subscriber from the database
[MAILPOET-4773]
2022-11-07 04:41:47 -06:00
6ee45f0f54 Add method to retrieve subsccriber
[MAILPOET-4773]
2022-11-07 04:41:47 -06:00
2e9ae1ed0b Add info about subscribe in registration from setting
[MAILPOET-4772]
2022-11-07 04:41:47 -06:00
74b12bd2d9 Change trigger to mailpoet_segment_subscribed
We should listen to mailpoet_segment_subscribed to start the trigger.
This means the subscriber is confirmed. And it removes the fatal error
which was produced by not finding the $segment during signup.

[MAILPOET-4772]
[MAILPOET-4773]
2022-11-07 04:41:47 -06:00
279adcfbcf Test user registration triggers automation
[MAILPOET-4773]
2022-11-07 04:41:47 -06:00
64d655857b Explicitly declare compatibility with Woo High Performance Order Tables
This was done following the instructions published by the WooCommerce
team: pcShBQ-oY-p2

[MAILPOET-4726]
2022-11-07 10:42:38 +01:00
b2b5f3c22a Add Woo tags "WC requires at least" and "WC tested up to"
As discussed in this P2 post (pcNwfB-1lW-p2), we will start using the
Woo tags "WC requires at least" and "WC tested up to". The "WC tested up
to" tag is required by WooCommerce for extensions to explicitly declare
compatibility with Woo High Performance Order Tables (pcShBQ-oY-p2). The
"WC requires at least" is not currently used by WooCommerce, but it
helps us make more explicit which versions of Woo MailPoet currently
supports.

[MAILPOET-4726]
2022-11-07 10:42:38 +01:00
588f3a9feb Use "reply to" from settings only when they are different than "from" settings
[MAILPOET-4757]
2022-11-07 11:17:36 +02:00
8c676b773d Fix hook type
[MAILPOET-4757]
2022-11-07 11:17:36 +02:00
c76a0adb5e Move validation rules for active workflows below structural rules
[MAILPOET-4757]
2022-11-07 11:17:36 +02:00
848fc51070 Run full workflow validation for all non-draft statuses
[MAILPOET-4757]
2022-11-07 11:17:36 +02:00
af1e09f46f Remove "inactive" status for now, use "draft" instead
[MAILPOET-4757]
2022-11-07 11:17:36 +02:00
f1abfe557a Use undefined for no value in GA campaign field
[MAILPOET-4757]
2022-11-07 11:17:36 +02:00
aa52ca804e Expose send email create step filter
[MAILPOET-4757]
2022-11-07 11:17:36 +02:00
273551fa36 Add type for a step creation callback
[MAILPOET-4757]x
2022-11-07 11:17:36 +02:00
17898b243a Use default reply to values when no previous values are set
[MAILPOET-4757]
2022-11-07 11:17:36 +02:00
81ed12d454 Use previous reply to values when toggled off and on
[MAILPOET-4757]
2022-11-07 11:17:36 +02:00
2f78c99381 Fix reply-to panel empty value handling
[MAILPOET-4757]
2022-11-07 11:17:36 +02:00
480c7d25e0 Delete step args when they are set to "undefined"
[MAILPOET-4757]
2022-11-07 11:17:36 +02:00
c1a6c5a215 Force sidebar remount to avoid different steps mixing their data
[MAILPOET-4757]
2022-11-07 11:17:36 +02:00
8fadc87036 Enable delay in minutes
[MAILPOET-4757]
2022-11-07 11:17:36 +02:00
5176566882 Remove debug info from step panel
[MAILPOET-4757]
2022-11-07 11:17:36 +02:00
b52b9990da Improve workflow name rendering in listing
[MAILPOET-4757]
2022-11-07 11:17:36 +02:00
8796599d89 Automatically open sidebar panels when their fields contain errors
[MAILPOET-4757]
2022-11-07 11:17:36 +02:00
9808245d30 Set errors object also for non-step errors to propagate correct state
[MAILPOET-4757]
2022-11-07 11:17:36 +02:00
12f2d1730f Do not enforce workflow content for non-active workflows
[MAILPOET-4757]
2022-11-07 11:17:36 +02:00
dac8c1e2f3 Improve assertEqualDateTimes helper interface
Make sure that both dates parameters have to be passed into the method.
[MAILPOET-4723]
2022-11-07 10:10:17 +01:00
a3e1f8d8c6 Fix flaky AbandonedCartTest
Fix the flaky DateTime comparisons test by allowing 1 second delta
[MAILPOET-4723]
2022-11-07 10:10:17 +01:00
2c28449b58 Add helper method for comparing DateTimeInterface objects
This commit adds a method to the integration tester that allows
comparing two DateTimeInterface objects and specify tolerated delta.
It also allows passing null and assert the DateTimeInterface internally.
This is because often our entities have return type DateTimeInterface|null
So with the internal checks we don't have to make those instance of checks
each time we pass date from entity into the method.
Note: I was not able to use $this->assertInstanceOf because PHPStan was not accepting that
and still complained.
[MAILPOET-4723]
2022-11-07 10:10:17 +01:00
43197bf859 Use 24-hour format in migration timestamps
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
bd34c4e7ec Ignore index.php in migrations directory
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
511b8ad7ff Retry timed out and failed migrations
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
a60562254c Temporarily fix reinstall test wiping out automation tables
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
96368cbd3f Move one-time migrations from populator to the new initial migration
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
e384e7dea3 Merge inactive subscribers frequency test into the new initial migration test
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
86fbcd3a57 Annotate types for PHPStan rather than using baseline files
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
9730fb9272 Move the old dbDelta-based migrator to a migration
This will ensure it runs once and from there, it will continue using the new migrations.

[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
a3f2ee8bbb Implement CLI output logging when running migrations
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
a177b3b8da Add the possibility to use a logger in migrator
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
f369fdfa4a Add ./do migrations:new command to generate migration files
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
80a6e78d48 Allow underscored naming in lib/Migrations
This is to allow readable naming of migration files and classes, such as "Migration_20221023_040819".
2022-11-07 10:05:42 +01:00
f65821256c Run migrations on activation
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
dd10389c55 Implement WP CLI command to show migrations info
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
3dd6ef3da7 Implement WP CLI command to run migrations
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
036d0a29ae Implement full migration running logic
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
d199e0b77e Add migrator service with ability to resolve status of all migrations
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
17ab79aa6f Add store method to list all migrations
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
b10cd32449 Add runner to execute a migration and save its status
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
f9001c1826 Add store methods to start, complete, and fail a migration
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
31050394b9 Add a store with a method to create migrations table when it doesn't exist
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
e9970f3cc8 Implement loading existing migration classes from the filesystem
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
516c460ace Add repository with the ability to create new migration classes
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
03d80290e6 Add a migration template that will be used to generate new migrations
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
d65b567858 Add abstract migration class with access to connection, entity manager, and the DI container
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
0d10f4b1dd Enable mocking non-object properties in test service overrides
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
610d0204eb Add link to email statistics page
[MAILPOET-4777]
2022-11-07 10:25:21 +02:00
545a4adc66 Fix typo
[MAILPOET-4744]
2022-11-07 02:22:21 -06:00
38d8a1cd00 Wrap updateingActiveWorkflowNotPossible in useEffect
[MAILPOET-4744]
2022-11-07 02:22:21 -06:00
53201c7422 Rename imported select
[MAILPOET4744]
2022-11-07 02:22:21 -06:00
6f447e8a93 Show snackbar message on boot when updating not possible
[MAILPOET-4744]
2022-11-07 02:22:21 -06:00
368a400fea Allow updating an active workflow when no user is in progress
[MAILPOET-4744]
2022-11-07 02:22:21 -06:00
902eeccea1 Block updating workflows with active runs in the backend
[MAILPOET-4744]
2022-11-07 02:22:21 -06:00
c8cf00a151 Add delay to tooltips
[MAILPOET-4744]
2022-11-07 02:22:21 -06:00
f41423e6a2 Add period at the end of the sentence
[MAILPOET-4744]
2022-11-07 02:22:21 -06:00
774485d5f2 Deactivate 'update/activate' buttons when status is active/deactivting
[MAILPOET-4744]
2022-11-07 02:22:21 -06:00
8f4d62b080 Hide search on Listing page
[MAILPOET-4779]
2022-11-07 02:14:40 -06:00
8003a3e97f Do only trigger when segment is of type default
[MAILPOET-4771]
2022-11-05 07:40:43 +01:00
cf572985a7 Add test to ensure WC checkout only triggers one flow
[MAILPOET-4771]
2022-11-05 07:40:43 +01:00
c4966a9cc1 Prevent flakiness when comparing time in NewsletterTest
When comparing the sentAt and processedAt dates there might be one second difference.
This may happen also in the application, because they are updated by separate queries.

This commit fixes the flakiness by comparing timestamps with delta 1 second instead of comparing date time strings.
[MAILPOET-4710]
2022-11-04 12:14:36 -03:00
c6e6b13731 Run Woo HPOS tests in all branches
This commit reverts 4256a18b82 so that the
Woo HPOS tests are executed in all branches instead of just trunk and
the Woo HPOS related branches.

[MAILPOET-4648]
2022-11-04 14:17:28 +01:00
975041d211 Stop allowing Woo HPOS tests to fail
This commit basically reverts all the changes from
5d8ccb96b4 to stop allowing Woo HPOS
related tests to fail on the CircleCI builds now that all the issues
were fixed and all tests should pass.

[MAILPOET-4648]
2022-11-04 14:17:28 +01:00
ea16472ab1 Use Codeception\TestInterface::getName() instead of Codeception\TestInterface::getMetadata()
This commit changes the code to use $event->getTest()->getName() instead
of $event->getTest()->getMetadata()->getName() to get the name of the
current test. This was necessary because the latter was returning null
for integration tests while the former works both for acceptance and
integration tests. I did not investigate why Codeception behaves this
way due to lack of time, there is a chance that this is a bug in
Codeception.

Since $event->getTest() returns an instance of TestInterface and this
class does not define getName() (but the call works probably due to some
magic method), it was necessary to edit phpstan.neon to skip a PHPStan
error.

[MAILPOET-4765]
2022-11-04 12:43:48 +01:00
713b0255f7 Add WooCommerce Subscriptions tests to $allowedToSkipList list
We skip those tests in some cenarios because WooCommerce Subscriptions
does not support Woo HPOS yet. When the code to skip them was added, we
forgot to add those tests to the list of tests that are allowed to skip
even in the trunk and release branches. This is done now in this commit.

[MAILPOET-4765]
2022-11-04 12:43:48 +01:00
2aa63bbb8e Fix typo
[MAILPOET-4765]
2022-11-04 12:43:48 +01:00
f6708d9526 Change the system that is used to prevent skipped tests
This commit changes the system that is used to prevent skipped tests
when CircleCI executes the integration tests against the trunk
and release branches. After this commit, the integration tests will use
the same system that is used by the acceptance tests. Besides
consolidating everything into a single system, this change is necessary
because we will need to know the name of the tests as we want to allow
some integration tests to be skipped in some circumstances, and this was
not possible with the old system.

[MAILPOET-4765]
2022-11-04 12:43:48 +01:00
65b56271d4 Update Woo HPOS build in test to the latest version
The latest version is 7.1.0-rc.2. Since this build is available on
WP.org, this commit also removes the custom code that we had to download
builds from GitHub. We can now use \RoboFile::downloadWooCommerceZip()
to download builds to test Woo HPOS.

[MAILPOET-4704]
2022-11-04 10:39:59 +01:00
c9c35d591b Update URLs in email templates
[MAILPOET-4758]
2022-11-04 10:51:23 +02:00
e9cfcb51ba Add missing strings
[MAILPOET-4758]
2022-11-04 10:51:23 +02:00
dc5e5b4f8b Use "automation" instead of "workflow" in user-facing strings
[MAILPOET-4758]
2022-11-04 10:51:23 +02:00
ccb5369c57 Use https everywhere for www.mailpoet.com
[MAILPOET-4758]
2022-11-04 10:51:23 +02:00
bfe3ff17af Fix translation strings
[MAILPOET-4758]
2022-11-04 10:51:23 +02:00
756b0587bc Return an empty string for footer when on automation page
[MAILPOET-4755]
2022-11-04 06:26:21 +02:00
af3d08ff36 Add method to detect automation pages
[MAILPOET-4755]
2022-11-04 06:26:21 +02:00
a91913e633 Make 'Give feedback' translateable
[MAILPOET-4755]
2022-11-04 06:26:21 +02:00
736d8a8b12 Add 'Give feedback' beacon ID to automation pages
[MAILPOET-4755]
2022-11-04 06:26:21 +02:00
9b5bdb2206 Release 3.102.1 2022-11-03 22:49:42 +03:00
3ad606a767 Revert "Change the system that is used to prevent skipped tests"
This reverts commit 363ee93c25.
2022-11-03 12:29:48 -03:00
e0cab11293 Revert "Fix typo"
This reverts commit da110bed80.
2022-11-03 12:29:48 -03:00
bffafdcd33 Revert "Add WooCommerce Subscriptions tests to $allowedToSkipList list"
This reverts commit 6b4d2409cc.
2022-11-03 12:29:48 -03:00
6dfeb7a100 Prevent enabling Woo Blocks integration for older versions
Version 8.0.0 was shipped with WooCommerce 6.8.0 which is the oldest currently supported Woo version.
[MAILPOET-4774]
2022-11-03 15:16:43 +01:00
a6431678ed Remove backward compatibility for Woo Blocks ExtendRestApi
The new ExtendSchema was introduced in WCBlocks 7.2 which are way older
then we currently want to support.
[MAILPOET-4774]
2022-11-03 15:16:43 +01:00
cdcdfb135c Update php-stubs/woocommerce-stubs to the latest version
[MAILPOET-4774]
2022-11-03 15:16:43 +01:00
7821c5767b Use current namespace for Woo store API checkout schema class
The new namespace is supported from WooCommerce 6.4.0 so we don't need
to support the old namespace any more.
Some users reported issues with BC class aliases provided by Woo.
[MAILPOET-4774]
2022-11-03 15:16:43 +01:00
6a5b7adc16 Prefix polyfilled normalizer functions
[MAILPOET-4770]
2022-11-03 12:39:24 +01:00
e58de01950 Improve mobile behavior of hero image
[MAILPOET-4536]
2022-11-03 11:56:21 +01:00
ae6e790879 Adjust hight of hero picture to align with blue button
[MAILPOET-4536]
2022-11-03 11:56:21 +01:00
d21b2fe21d Ensure same width of template buttons
[MAILPOET-4536]
2022-11-03 11:56:21 +01:00
6b8e8988b8 Keep template button columns aligned on top
[MAILPOET-4536]
2022-11-03 11:56:21 +01:00
0db495eb1d Use DropdownMenu in OptionButton component
[MAILPOET-4536]
2022-11-03 11:56:21 +01:00
6ad315b8de Add mailpoet-automation-section-content to define a max-width for section content
[MAILPOET-4536]
2022-11-03 11:56:21 +01:00
945ff65358 Use cdn url for automation assets
[MAILPOET-4536]
2022-11-03 11:56:21 +01:00
e0458ca444 Sort use statements alphabetically
[MAILPOET-4536]
2022-11-03 11:56:21 +01:00
5bd639e0be Add automation listing header
[MAILPOET-4536]
2022-11-03 11:56:21 +01:00
c78a050d86 Reduce nesting in CSS
[MAILPOET-4536]
2022-11-03 11:56:21 +01:00
e37a824d86 Hide notices on onboarding screen
[MAILPOET-4536]
2022-11-03 11:56:21 +01:00
fe4d78992f Let image go below build-your-own list on mobile
[MAILPOET-4536]
2022-11-03 11:56:21 +01:00
1c380933e1 Adjust layout of build-your-own list
[MAILPOET-4536]
2022-11-03 11:56:21 +01:00
a8c3465133 Add space between options menu and options button
[MAILPOET-4536]
2022-11-03 11:56:21 +01:00
edbfb957b1 Ensure there is space between template items and enable wrap
[MAILPOET-4536]
2022-11-03 11:56:21 +01:00
161b8d8f34 Reduce right padding of sections by 20px
Those 20px to the border are already in the double usage of the .wrap class in the DOM

[MAILPOET-4536]
2022-11-03 11:56:21 +01:00
96d9347cff Move automation image assets directory
[MAILPOET-4536]
2022-11-03 11:56:21 +01:00
dfb7133dbb Use images with a better quality
[MAILPOET-4536]
2022-11-03 11:56:21 +01:00
a264b00200 Simplify full-width definition
The values to define fullwidth are derived from #wpcontent and .wrap
The div.wrap exists actually twice in our templates, so those values
needed to be multiplied by 2.

[MAILPOET-4536]
2022-11-03 11:56:21 +01:00
100a301476 Ensure template items are of same height
[MAILPOET-4536]
2022-11-03 11:56:21 +01:00
35c3ebfb20 Add Non-breaking space
[MAILPOET-4536]
2022-11-03 11:56:21 +01:00
e3db69282d Rephrase to 'Explore essentials'
[MAILPOET-4536]
2022-11-03 11:56:21 +01:00
45999f98b2 align template-list items layout
[MAILPOET-4536]
2022-11-03 11:56:21 +01:00
6f5c39e97c Add missing period
[MAILPOET-4536]
2022-11-03 11:56:21 +01:00
4644f3fe08 Adjust automation test to new UI
[MAILPOET-4536]
2022-11-03 11:56:21 +01:00
d951ebd351 Add different sections for welcome screen
[MAILPOET-4536]
2022-11-03 11:56:21 +01:00
a7bc4e7c70 Add <OptionButton> component
[MAILPOET-4536]
2022-11-03 11:56:21 +01:00
a08553c9bc Add path the image assets
[MAILPOET-4536]
2022-11-03 11:56:21 +01:00
8161b83ded Add check on list type when deleting list
[MAILPOET-4752]
2022-11-02 14:05:39 +01:00
ad46d05c6b Add check on list type
[MAILPOET-4752]
2022-11-02 14:05:39 +01:00
f231f3dc6d Fix type error for list update
[MAILPOET-4752]
2022-11-02 14:05:39 +01:00
933b947f45 Add deleteList documentation
[MAILPOET-4752]
2022-11-02 14:05:39 +01:00
f6a5e0117c Add deleteList test cases
[MAILPOET-4752]
2022-11-02 14:05:39 +01:00
56c79dd66a Add API method deleteList
[MAILPOET-4752]
2022-11-02 14:05:39 +01:00
25ba667cb1 Move segment id validation to private method
[MAILPOET-4752]
2022-11-02 14:05:39 +01:00
1ac9c86a66 Add updateList documentation
[MAILPOET-4752]
2022-11-02 14:05:39 +01:00
94a2e54c1e Add test cases for updateList
[MAILPOET-4752]
2022-11-02 14:05:39 +01:00
fbf4c853c1 Add new API method updateList
[MAILPOET-4752]
2022-11-02 14:05:39 +01:00
5fba25d823 Fix the exception message
[MAILPOET-4752]
2022-11-02 14:05:39 +01:00
18efc02921 Move list validation to a private method
We move the segment's name validation to a private method to avoid code repetition.
[MAILPOET-4752]
2022-11-02 14:05:39 +01:00
bdd803c517 Support text wrap in forms submit button
MAILPOET-4638
2022-11-02 11:33:44 +01:00
382e232538 Add CSS class form-editor-sidebar-heading back to component
MAILPOET-4650
2022-11-02 11:24:57 +01:00
a2cddc761c Make the labels in form editor consistent
MAILPOET-4650
2022-11-02 11:24:57 +01:00
6b4d2409cc Add WooCommerce Subscriptions tests to $allowedToSkipList list
We skip those tests in some cenarios because WooCommerce Subscriptions
does not support Woo HPOS yet. When the code to skip them was added, we
forgot to add those tests to the list of tests that are allowed to skip
even in the trunk and release branches. This is done now in this commit.

[MAILPOET-4765]
2022-11-02 10:27:34 +01:00
da110bed80 Fix typo
[MAILPOET-4765]
2022-11-02 10:27:34 +01:00
363ee93c25 Change the system that is used to prevent skipped tests
This commit changes the system that is used to prevent skipped tests
when CircleCI executes the integration tests against the trunk
and release branches. After this commit, the integration tests will use
the same system that is used by the acceptance tests. Besides
consolidating everything into a single system, this change is necessary
because we will need to know the name of the tests as we want to allow
some integration tests to be skipped in some circumstances, and this was
not possible with the old system.

[MAILPOET-4765]
2022-11-02 10:27:34 +01:00
db0024dc58 Specify return types for each filter
[MAILPOET-4674]
2022-11-01 15:56:28 +01:00
1b59b95f52 Use controls property of DropdownMenu
[MAILPOET-4674]
2022-11-01 15:56:28 +01:00
2d0673a864 Export @wordpress/icons
[MAILPOET-4674]
2022-11-01 15:56:28 +01:00
9f4b0d0ca1 Add filter so the more menu can be extended by third party
* Removes deprecated mailpoet.automation.workflow.delete_step_callback filter
* Adds mailpoet.automation.workflow.step.more-controls filter

[MAILPOET-4674]
2022-11-01 15:56:28 +01:00
97c1712fa6 Expose MenuItem and ConfirmDialog
[MAILPOET-4674]
2022-11-01 15:56:28 +01:00
455e3fbb90 Fix issue of site-url in none-lowercase failing validation
When validating the MSS/Premium keys sending a none-lowercase
site-url would cause the bridge to correctly validating

[MAILPOET-4754]
2022-11-01 15:00:07 +01:00
3c718e3f68 Update ViewInBrowserRenderer, Fix tracking config error
MAILPOET-4599
2022-11-01 14:59:28 +01:00
63e797ba37 Add more tests for new site shortcodes
MAILPOET-4599
2022-11-01 14:59:28 +01:00
48340872f8 Update acceptance tests for confirmation email
MAILPOET-4599
2022-11-01 14:59:28 +01:00
1b5d85d41a Render the current site title for [site:title] on signup confirmation page description
MAILPOET-4599
2022-11-01 14:59:28 +01:00
0595852d5a Update subscription confirmation email subject
Allow shortcode processing in subject

MAILPOET-4599
2022-11-01 14:59:28 +01:00
448e89d062 Update tests for confirmation emails
MAILPOET-4599
2022-11-01 14:59:28 +01:00
f92ee90e9b Add support for [site:title] and [site:homepage_link]
These will add support for these two shortcodes in the Shortcode engine

MAILPOET-4599
2022-11-01 14:59:28 +01:00
80f22c5b50 Process confirmation email content with newsletter shortcode engine
MAILPOET-4599
2022-11-01 14:59:28 +01:00
4b74d66529 Update subscription confirmation email content description
MAILPOET-4599
2022-11-01 14:59:28 +01:00
ca72e11d9a Update default subscription confirmation email content
MAILPOET-4599
2022-11-01 14:59:28 +01:00
5a0ec403f6 Update test cases to reflect change in method location
MAILPOET-4663
2022-11-01 14:58:47 +01:00
b6e7e39fb0 Rename method and move wcGetPageId to Woo helper class
MAILPOET-4663
2022-11-01 14:58:47 +01:00
8c24d59f43 Add tests for form display on Woo Shop listing page
MAILPOET-4663
2022-11-01 14:58:47 +01:00
5ed0c3fb2d Allow form display on Woo Shop listing page
The WooCommerce Shop page is a special kind of page. It’s basically a post archive.

The Shop page is a placeholder for a post type archive for products. It may render differently than other pages in your install.
https://woocommerce.com/document/woocommerce-pages/#section-4

It doesn’t have any content and WooCommerce core team is also removing the the-content filter from the Shop listing page hence why we are unable to hook into the the-content filter we use for other parts of the codebase

MAILPOET-4663
2022-11-01 14:58:47 +01:00
2151118183 Release 3.102.0 2022-11-01 16:53:44 +03:00
4c65374a0c Add some POT file headers that we've been using
[MAILPOET-4611]
2022-10-31 10:03:45 +01:00
32cf2084b8 Unify quotes in strings
[MAILPOET-4611]
2022-10-31 10:03:45 +01:00
9dc834e14a Pass translated automation strings to our @wordpress/i18n
[MAILPOET-4611]
2022-10-31 10:03:45 +01:00
3db11c443d Use WP-native translation system for marketing optin block
[MAILPOET-4611]
2022-10-31 10:03:45 +01:00
421549d6ee Make all automation strings in PHP translatable, improve context/comments
[MAILPOET-4611]
2022-10-31 10:03:45 +01:00
a7277f3437 Add context and translators comments where needed
[MAILPOET-4611]
2022-10-31 10:03:45 +01:00
4d56911230 Make all automation strings translatable
[MAILPOET-4611]
2022-10-31 10:03:45 +01:00
0f23dea7fc Don't add hash of JS bundles to their filenames, use plugin version parameter instead
[MAILPOET-4611]
2022-10-31 10:03:45 +01:00
742e3e85e9 Load translations for automation scripts using wp_set_script_translations()
[MAILPOET-4611]
2022-10-31 10:03:45 +01:00
6eeb5bb1bf Load all automation scripts using wp_enqueue_script()
[MAILPOET-4611]
2022-10-31 10:03:45 +01:00
01eb59a295 Keep only the part of the old makepot logic that is required for HTML and HBS files
[MAILPOET-4611]
2022-10-31 10:03:45 +01:00
8ddd42ea4c Generate translations after JS assets are built
[MAILPOET-4611]
2022-10-31 10:03:45 +01:00
eb80adc2ed Extract translations from PHP and JS/TS files using WP CLI
[MAILPOET-4611]
2022-10-31 10:03:45 +01:00
3103ef11d5 Use old translation extraction logic only for HTML and HBS files
[MAILPOET-4611]
2022-10-31 10:03:45 +01:00
a1ead743fa Complete translation directory exclusion list, make it more readable
[MAILPOET-4611]
2022-10-31 10:03:45 +01:00
c8d0291e41 Fix acceptance test flakyness for allowSubscribeInComments 2022-10-28 13:42:09 +01:00
bd44d77973 Fix acceptance test failure for woocommerce setup wizard 2022-10-28 13:42:09 +01:00
f872ab1819 Update expectation for confirmation emails on multisite
MAILPOET-4667
2022-10-28 13:42:09 +01:00
55371ce7ee Reset fetchingPreviewLink and disable button while link is fetched
[MAILPOET-4631]
2022-10-27 10:43:53 -05:00
ba45d23307 Fetch preview link when user clicks on preview
[MAILPOET-4631]
2022-10-27 10:43:53 -05:00
f660bd9bd7 Add Email Preview link
[MAILPOET-4631]
2022-10-27 10:43:53 -05:00
1332fb89e4 Update acceptance tests for confirmation page
MAILPOET-4667
2022-10-27 13:42:50 +02:00
dc5254721e Update the confirmation page title
Show website title instead of list names

MAILPOET-4667
2022-10-27 13:42:50 +02:00
918a4d7c74 Refresh the sending queue entity when fetching it from the old model
By moving the refresh code into the method used for getting sending queue entity for the old model object
we want to make our code better protected from working with inconsistent sending queue data.
[MAILPOET-4750]
2022-10-27 12:08:31 +02:00
ec29c8fb49 Change order of saving sending task related data
In case we save the task and and queue saving fails the sending may be triggered with incorrect data in the queue.
Since the scheduled task is used for controlling sending state lets save it as last so that we are sure all related
data are up to date before saving the task.
[MAILPOET-4750]
2022-10-27 12:08:31 +02:00
43922a7c27 Notify about subscriber changes in WP and Woo synchronizations
[MAILPOET-4727]
2022-10-27 09:31:40 +02:00
76b1166269 Add methods for batch changes
Because sometimes can be difficult to get updated and created subscribers, I decided to create methods that doesn't need subscriber ids.
[MAILPOET-4727]
2022-10-27 09:31:40 +02:00
12c0605f92 Fix variable name typo
[MAILPOET-4727]
2022-10-27 09:31:40 +02:00
0bbf1b96d5 Add notifications about imported subscribers
[MAILPOET-4727]
2022-10-27 09:31:40 +02:00
b716b427a7 Fix UTC time for changes
[MAILPOET-4727]
2022-10-27 09:31:40 +02:00
c1ac9f7922 Add test case on notifications during shutdown
[MAILPOET-4727]
2022-10-27 09:31:40 +02:00
3dd872e211 Add SubscriberListener integration test
[MAILPOET-4727]
2022-10-27 09:31:40 +02:00
a09a9cdcbf Add typecast to batch methods
Because functions can return ids as a string, the typecast is necessary to avoid type errors.
[MAILPOET-4727]
2022-10-27 09:31:40 +02:00
2d835cdec1 Add new action hooks for multiple changes
[MAILPOET-4727]
2022-10-27 09:31:40 +02:00
28b91ed994 Notify about subscriber changes in repository
[MAILPOET-4727]
2022-10-27 09:31:40 +02:00
1e147c9dd5 Add notify actions for multiple subscribers
[MAILPOET-4727]
2022-10-27 09:31:40 +02:00
6f89b47b30 Store time of change in SubscriberChangesNotifier
[MAILPOET-4727]
2022-10-27 09:31:40 +02:00
8d5c07a317 Add notifying about deleted subscribers
[MAILPOET-4727]
2022-10-27 09:31:40 +02:00
9ff72b4d4c Add SubscriberListener for notification about changes
[MAILPOET-4727]
2022-10-27 09:31:40 +02:00
4fe5219b89 Add notifying about changes to the shutdown hook
[MAILPOET-4727]
2022-10-27 09:31:40 +02:00
2dab7fdb0c Add new service for handling subscriber changes
This new service should store all changes and notify about them at the end of the HTTP request.
[MAILPOET-4727]
2022-10-27 09:31:40 +02:00
5075982cd3 Rename validateArray to validateSchemaArray and specify the format in doc comment
[MAILPOET-4700]
2022-10-26 12:51:16 +02:00
1a58166a0b Improve error message for the case when no email has been designed yet.
[MAILPOET-4700]
2022-10-26 12:51:16 +02:00
ca0681b1a7 Use alert icon from Figma
[MAILPOET-4700]
2022-10-26 12:51:16 +02:00
540b34c63f Validate multiple properties
[MAILPOET-4700]
2022-10-26 12:51:16 +02:00
c8565b1197 Add validateArray method
[MAILPOET-4700]
2022-10-26 12:51:16 +02:00
75906820e5 Reset recent changes in Validator
[MAILPOET-4700]
2022-10-26 12:51:16 +02:00
2cacb5809d Avoid iteration
[MAILPOET-4700]
2022-10-26 12:51:16 +02:00
900faa2a71 order error cases
[MAILPOET-4700]
2022-10-26 12:51:16 +02:00
c140eea734 Adjust DelayActionTest to new error format
[MAILPOET-4700]
2022-10-26 12:51:16 +02:00
5201c359d3 Adjust SendEmailActionTest to new error format
[MAILPOET-4700]
2022-10-26 12:51:16 +02:00
4e1b1b3c27 Ensure at least one trigger is present and triggers are followed by actions
[MAILPOET-4700]
2022-10-26 12:51:16 +02:00
8af01c3bcb Use Rest API error codes and map them to error messages
[MAILPOET-4700]
2022-10-26 12:51:16 +02:00
d94dabb8d6 Style error messages and fields
[MAILPOET-4700]
2022-10-26 12:51:16 +02:00
63b1f1670b Render error fields and messages in steps
[MAILPOET-4700]
2022-10-26 12:51:16 +02:00
2d050b0ea5 Update StepError type to conform with new API response
[MAILPOET-4700]
2022-10-26 12:51:16 +02:00
686f702ec9 Add errors per field in Response data
[MAILPOET-4700]
2022-10-26 12:51:16 +02:00
5754302154 Add all errors from WordPress to the \ValidationException
[MAILPOET-4700]
2022-10-26 12:51:16 +02:00
e2ede3e568 use withError to build error message
[MAILPOET-4700]
2022-10-26 12:51:16 +02:00
f95824dea0 Add withError() method to exceptions
[MAILPOET-4700]
2022-10-26 12:51:16 +02:00
650a8704cd Show saved message when workflow is saved
[MAILPOET-4700]
2022-10-26 12:51:16 +02:00
cd37f92592 PR feedback: add the default value back
[MAILPOET-4521]
2022-10-26 12:28:22 +02:00
6bf201b45e Remove propTypes and defaultProps from AuthorizeSenderEmailModal
Removing the defaultProps is safe since the defaulted prop
is mandatory by TS

[MAILPOET-4521]
2022-10-26 12:28:22 +02:00
e178d6519c Remove propTypes from StylesSettingsPanel
[MAILPOET-4521]
2022-10-26 12:28:22 +02:00
97d4a8e4f8 Remove propTypes definition for InputStylesSettings
[MAILPOET-4521]
2022-10-26 12:28:22 +02:00
e5ce252587 Remove propTypes from FormFieldTokenField
[MAILPOET-4521]
2022-10-26 12:28:22 +02:00
b7cae6dac4 Remove propTypes & defaultProps from authorize_sender_domain_modal
Safe removal of defaultProps since the defauleted prop is
mandatory by TS and always set by users

[MAILPOET-4521]
2022-10-26 12:28:22 +02:00
07d3b753b8 Remove babel-plugin-typescript-to-proptypes package
[MAILPOET-4521]
2022-10-26 12:28:22 +02:00
72ef0909f5 Stop executing workers when execution limit is reached
When execution limit is reached it makes no sense to continue and
execute additional workers or log the execution limit exception as an error.
[MAILPOET-4725]
2022-10-26 10:13:05 +02:00
a5473bf882 Use proper logger name for logging cron errors
[MAILPOET-4725]
2022-10-26 10:13:05 +02:00
c4e7ea4c8e Use addFilter instead of addAction
[MAILPOET-4728]
2022-10-25 12:04:44 -05:00
ce462f1643 Close correct HTML element type
[MAILPOET-4728]
2022-10-25 12:04:44 -05:00
91936aff92 Rename Automation to Automations in Menu
[MAILPOET-4728]
2022-10-25 12:04:44 -05:00
57858bbe9a Move Automation menu item between Emails and Forms
[MAILPOET-4728]
2022-10-25 12:04:44 -05:00
42d9b1241e Make menu strings translateable and use esc_html__() for menu titles
[MAILPOET-4728]
2022-10-25 12:04:44 -05:00
fc4a5315df Add beta badge
[MAILPOET-4728]
2022-10-25 12:04:44 -05:00
e771bd53da Release 3.101.1 2022-10-25 15:42:37 +02:00
291f46d732 Fix spacing in docs 2022-10-25 13:13:47 +01:00
e236d3312c Fix listId typo 2022-10-25 13:15:28 +02:00
794090291a Update getSubscribers filter arguments
Filter arguments 'list_id' and 'min_updated_at' do not work. These arguments currently only work with lowerCamelCase.
2022-10-25 13:15:28 +02:00
380eec1ed6 Add prop types for deactivation modals
[MAILPOET-4731]
2022-10-25 12:46:07 +02:00
7c283b7fda Use " for quotation marks
[MAILPOET-4731]
2022-10-25 12:46:07 +02:00
916080fa5a Reset step runners to not interfer with other tests
[MAILPOET-4731]
2022-10-25 12:46:07 +02:00
c10f80457d Use new getCountForWorkflow for performance
[MAILPOET-4731]
2022-10-25 12:46:07 +02:00
9773408c8b Add getCountForWorkflow method to return how many runs exist for specific status
[MAILPOET-4731]
2022-10-25 12:46:07 +02:00
5ba5426281 truncate entries of WorkflowRunLogStorage
[MAILPOET-4731]
2022-10-25 12:46:07 +02:00
098aebfaf9 Add truncate() method to WorkflowRunLogStorage
[MAILPOET-4731]
2022-10-25 12:46:07 +02:00
75d79f19cc Add information that deleting a workflow deletes also the workflow runs
[MAILPOET-4731]
2022-10-25 12:46:07 +02:00
1b70e6d494 Ensure workflows are active
[MAILPOET-4731]
2022-10-25 12:46:07 +02:00
2c57251bae Revert e8cfb2565
[MAILPOET-4731]
2022-10-25 12:46:07 +02:00
9bdb32c073 Verify deactivating workflow gets inactive after last workflow run
[MAILPOET-4731]
2022-10-25 12:46:07 +02:00
b74890137a Set a deactivating Workflow to inactive once all runs are completed
[MAILPOET-4731]
2022-10-25 12:46:07 +02:00
57548b579f Add method to fetch all runs of a workflow
[MAILPOET-4731]
2022-10-25 12:46:07 +02:00
7aa1a5f4ba Enable setStatus to handle multiple WorkflowRuns at the same time
[MAILPOET-4731]
2022-10-25 12:46:07 +02:00
d60e399a3b Alter buttons depending on workflow state, use DeactivateImmediatelyModal
[MAILPOET-4731]
2022-10-25 12:46:07 +02:00
da34614b5c Add new DeactivateImmediatelyModal
[MAILPOET-4731]
2022-10-25 12:46:07 +02:00
a0d330fded Deactivate workflow on button click depending on selected status
[MAILPOET-4731]
2022-10-25 12:46:07 +02:00
f766661f8c Show Deactivating state in header
[MAILPOET-4731]
2022-10-25 12:46:07 +02:00
82ddce42df Use WorkflowStatus enum for valid status values in Workflow type
[MAILPOET-4731]
2022-10-25 12:46:07 +02:00
bfe95676c3 Add switch to decide which deactivation state we want to set the workflow to
[MAILPOET-4731]
2022-10-25 12:46:07 +02:00
789bb0b396 Use workflow status constants
[MAILPOET-4731]
2022-10-25 12:46:07 +02:00
2620ef0b57 Do not handle workflow runs when workflow status is not active/deactivating
[MAILPOET-4731]
2022-10-25 12:46:07 +02:00
627962570e Add new workflow status 'deactivating'
[MAILPOET-4731]
2022-10-25 12:46:07 +02:00
bbdbf6a52d Fix WooCommerce setup in the welcome wizard
The component that requires the global mailpoet_show_customers_import
variable is used also on the wizard page.
This commit ensures that it is set on the page.
[MAILPOET-4652]
2022-10-24 15:16:04 +02:00
56ed9f4ece Update acceptance tests for Woo setup page
[MAILPOET-4652]
2022-10-24 15:16:04 +02:00
e6188f5cef Update WooCommerce cookie tracking info in Wizard
[MAILPOET-4652]
2022-10-24 15:16:04 +02:00
a37e5bbe74 Hide WooCommerce initial import from wizard when there are no customers
[MAILPOET-4672]
2022-10-24 15:16:04 +02:00
9df99b1a00 Add method for getting customers count to WooCommerce helper
[MAILPOET-4652]
2022-10-24 15:16:04 +02:00
5ff543e62d Unify default values of mailpoet_subscribe_old_woocommerce_customers
The value is used in case the setting is not defined. Normally this shouldn't
happen because we set the value in the wizard.
The default value used in PHP is false, but in settings in admin was true.
See b0aacdd4ef/mailpoet/lib/Segments/WooCommerce.php (L528)
This commit unifies it.

[MAILPOET-4652]
2022-10-24 15:16:04 +02:00
8f14c5ac53 Fix issue caused by merge conflict
[MAILPOET-4591]
2022-10-24 14:05:41 +02:00
4e0aa3c56d Remove redundant code which was selectively disabling validation
We no longer need selective validation disabling since we're
disabling all validations when saving a draft

[MAILPOET-4591]
2022-10-24 14:05:41 +02:00
545c6bfa5e Disable all validations when saving a draft
[MAILPOET-4591]
2022-10-24 14:05:41 +02:00
cd3652eaa6 Fix canceling multiple automatic emails
When we deleted sending queue using SQL it remained in the entity manager
and subsequent flush (not the first one) triggered the error, because it didn't know the ScheduledTask entity attached
to the orphaned SendingQueue entity.

This commit fixes this by refactoring deletion of sending queue using standard repository method.
After fixing the issue for sending queue there was another issue with SchedulesTaskSubscriberEntity that remained in memory.
I fixed that by detaching those. Theoretically there might be many SchedulesTaskSubscriberEntities for an Automatic email so
I consider still safer to delete using SQL and if there are some loaded (in this case there is one) detach them.
[MAILPOET-4741]
2022-10-24 14:03:54 +02:00
655641737b Do not use toggleModal()
[MAILPOET-4730]
2022-10-24 13:49:15 +03:00
152794720a Add DeactivateButton and logic
[MAILPOET-4730]
2022-10-24 13:49:15 +03:00
cb294fb303 Style DeactivateModal component
[MAILPOET-4730]
2022-10-24 13:49:15 +03:00
98744a53c1 Add Deactivate Modal
[MAILPOET-4730]
2022-10-24 13:49:15 +03:00
430fcc20a8 Add new store action to deactivate a workflow
[MAILPOET-4730]
2022-10-24 13:49:15 +03:00
1df78f22d3 Make the message better
[MAILPOET-4740]
2022-10-24 10:18:28 +02:00
2f823f5606 On settings page, Remove the dependency between loading 3rd-party libraries and tracking (data sharing). Allow user choose toggle values independently
MAILPOET-4657
2022-10-20 10:49:48 +02:00
086d6dce7e On WelcomeWizardUsageTrackingStep, Remove the dependency between loading 3rd-party libraries and tracking (data sharing). Allow user choose toggle values independently
MAILPOET-4657
2022-10-20 10:49:48 +02:00
879cca9fb3 On WelcomeWizardUsageTrackingStep, update section wordings and re-order items
MAILPOET-4657
2022-10-20 10:49:48 +02:00
3434fbe3b5 Add not-allowed cursor to disabled form fields
[PREMIUM-200]
2022-10-20 10:30:30 +02:00
d4f9ccca5e Add disabled class to the wrapper of a disabled field
[PREMIUM-200]
2022-10-20 10:30:30 +02:00
4a74c3e6fd Open premium modal if the premium plugin is not active
[PREMIUM-200]
2022-10-20 10:30:30 +02:00
60d9a3f1ac Add posibility to add wrapper click handler to form fields
In some cases we need to disable the form field but add a click
handler to the field, but to make it work accross browsers the
click handler should get added to the wrapper and not the disabled
form field itself

[PREMIUM-200]
2022-10-20 10:30:30 +02:00
b64fbbdb7f Remove ga field default value when disabled
[PREMIUM-200]
2022-10-20 10:30:30 +02:00
12e8d44a43 Disable ga field when premium plugin is not active
[PREMIUM-200]
2022-10-20 10:30:30 +02:00
667658ae2f Show 'is now activated' snackbar only when status of workflow is active
[MAILPOET-4737]
2022-10-20 10:24:06 +02:00
9d2624163c Close ActivatePanel when there are errors
[MAILPOET-4737]
2022-10-20 10:24:06 +02:00
8f6688eba7 Check for CircleCI results file existence 2022-10-20 09:31:58 +02:00
b360d9a2cf Set focus on new activate button
[MAILPOET-4530]
2022-10-19 13:34:45 +02:00
11384bbf6a Fix bug where the type of $step was Data\Step instead of Integration\Step
[MAILPOET-4530]
2022-10-19 13:34:45 +02:00
6235944442 Fix bug where an empty array would generate a malformed SQL query
[MAILPOET-4732]
2022-10-19 13:34:45 +02:00
83573b0d43 Use labels to make editor more accessible
[MAILPOET-4530]
2022-10-19 13:34:45 +02:00
bd87c09e1a Add acceptance test for automation workflow
* Creates an simple welcome email workflow
* Activates it
* Subscribes and checks whether the email arrives in the inbox

[MAILPOET-4530]
2022-10-19 13:34:45 +02:00
1010b64c05 Update updateNames() to work with Woo Custom Order Tables
[MAILPOET-4711]
2022-10-19 11:32:41 +02:00
dd1fcd5100 Add helper method to get the name of the WooCommerce order addresses table
[MAILPOET-4711]
2022-10-19 11:32:41 +02:00
75706c9e8b Store success message of activation in activate action
[MAILPOET-4462]
2022-10-19 09:07:33 +02:00
61e1dd6a83 Add an activating state
[MAILPOET-4462]
2022-10-19 09:07:33 +02:00
8d5af952f6 Use sprintf instead of replace
[MAILPOET-4462]
2022-10-19 09:07:33 +02:00
2751a4bf3a End the sentence with a period
[MAILPOET-4462]
2022-10-19 09:07:33 +02:00
ed297dd68d Show snackbar notice
[MAILPOET-4462]
2022-10-19 09:07:33 +02:00
17c7d42ede Remove activate toggle
[MAILPOET-4462]
2022-10-19 09:07:33 +02:00
1741b39375 Style ActivatePanel
[MAILPOET-4462]
2022-10-19 09:07:33 +02:00
800432ab54 Introduce ActivatePanel
[MAILPOET-4462]
2022-10-19 09:07:33 +02:00
f169c8f8ac Use save method in Update button
[MAILPOET-4462]
2022-10-19 09:07:33 +02:00
f92a12db30 Make strings translateable
[MAILPOET-4462]
2022-10-19 09:07:33 +02:00
3ea730a0b6 Fix tab button focus styles
[MAILPOET-4540]
2022-10-19 08:09:17 +03:00
e3c19fa306 Improve listing styles
[MAILPOET-4540]
2022-10-19 08:09:17 +03:00
f2c4890def Avoid loosing tab focus on navigation
[MAILPOET-4540]
2022-10-19 08:09:17 +03:00
5bc2f62d98 Improve namin & add small simplifications to listing
[MAILPOET-4540]
2022-10-19 08:09:17 +03:00
c954603bfc Improve popover rendering
1) Rendering it in a slot (under slot fill provider) avoids inheriting deeply nested styles.
2) Bottom-left is a nicer default as it's the rightmost button in the table rows.

[MAILPOET-4540]
2022-10-19 08:09:17 +03:00
bf552801ec Fix editor stats label color
[MAILPOET-4540]
2022-10-19 08:09:17 +03:00
6bb1af0a18 Simplify and fix stats rendering using CSS grid
Fixed separator rendering, simplified CSS (grid can do this), removed
had extra paddings that were causing problems on the listing page.

[MAILPOET-4540]
2022-10-19 08:09:17 +03:00
48dca5e298 Reuse stats component in workflow listing
[MAILPOET-4540]
2022-10-19 08:09:17 +03:00
c08813be1d Extract workflow stats to atomation root component level
[MAILPOET-4540]
2022-10-19 08:09:17 +03:00
1cc6d93717 Do not wrap or shrink status cells
[MAILPOET-4540]
2022-10-19 08:09:17 +03:00
18a071fd7b Render "edit" and "more" actions in the same column
[MAILPOET-4540]
2022-10-19 08:09:17 +03:00
32d310d999 Add listing api error handler
[MAILPOET-4540]
2022-10-19 08:09:17 +03:00
c76d18e647 Add edit workflow link
[MAILPOET-4540]
2022-10-19 08:09:17 +03:00
865706c112 Extract edit workflow from cell to a generic action
[MAILPOET-4540]
2022-10-19 08:09:17 +03:00
3238049828 Add undo trash button
[MAILPOET-4540]
2022-10-19 08:09:17 +03:00
a41de82030 Add workflow duplicate/trash/restore/delete success notices
[MAILPOET-4540]
2022-10-19 08:09:17 +03:00
ccec1faeb1 Add notices component for automation listing
This component combines data store from @wordpress/notices together with
MailPoet's notice rendering that is suitable for listing.

[MAILPOET-4540]
2022-10-19 08:09:17 +03:00
b19887add0 Remove duplicate notices div
[MAILPOET-4540]
2022-10-19 08:09:17 +03:00
ba2cb75877 Add delete confirmation dialog
[MAILPOET-4540]
2022-10-19 08:09:17 +03:00
b89905aa80 Add trash confirmation dialog
[MAILPOET-4540]
2022-10-19 08:09:17 +03:00
a25e879cac Add delete workflow action
[MAILPOET-4540]
2022-10-19 08:09:17 +03:00
0106c5123d Add restore workflow action
[MAILPOET-4540]
2022-10-19 08:09:17 +03:00
2cb20a8f63 Add trash workflow action
[MAILPOET-4540]
2022-10-19 08:09:17 +03:00
fe1a994442 Add duplicate workflow action, use dropdown from @wordpress/components
[MAILPOET-4540]
2022-10-19 08:09:17 +03:00
70889ab06d Load workflows list from store
[MAILPOET-4540]
2022-10-19 08:09:17 +03:00
aab6865f50 Initialize automation listing store
[MAILPOET-4540]
2022-10-19 08:09:17 +03:00
efd32043e3 Add workflow count to automation listing page
[MAILPOET-4540]
2022-10-19 08:09:17 +03:00
3eaa13a421 Add store for automation listing
[MAILPOET-4540]
2022-10-19 08:09:17 +03:00
80d2ab44a3 Release 3.101.0 2022-10-18 14:42:07 +02:00
2385 changed files with 58682 additions and 29555 deletions

View File

@ -71,13 +71,6 @@ anchors:
- trunk
- release
only_trunk_and_cot: &only_trunk_and_cot
filters:
branches:
only:
- trunk
- /^cot-.*/
multisite_acceptance_config: &multisite_acceptance_config
multisite: 1
requires:
@ -85,6 +78,11 @@ anchors:
- static_analysis_php8
<<: *only_trunk_and_release
command_add_github_key: &command_add_github_key
command: |
# Add GitHub to known_hosts (for jobs without a checkout step that need to clone repos)
echo "github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk=" >> ~/.ssh/known_hosts
executors:
wpcli_php_oldest:
<<: *default_job_config
@ -99,7 +97,7 @@ executors:
wpcli_php_latest:
<<: *default_job_config
docker:
- image: mailpoet/wordpress:8.1_20220718.1
- image: mailpoet/wordpress:8.1_20230307.1
wpcli_php_mysql_oldest:
<<: *default_job_config
@ -110,7 +108,7 @@ executors:
wpcli_php_mysql_latest:
<<: *default_job_config
docker:
- image: mailpoet/wordpress:8.1_20220718.1
- image: mailpoet/wordpress:8.1_20230307.1
- image: cimg/mysql:8.0
command: --default-authentication-plugin=mysql_native_password --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_520_ci
@ -186,10 +184,11 @@ jobs:
- run:
name: Download additional WP Plugins for tests
command: |
./do download:woo-commerce-zip 6.8.2
./do download:woo-commerce-subscriptions-zip 4.5.1
./do download:woo-commerce-memberships-zip 1.23.0
./do download:woo-commerce-blocks-zip 8.4.0
./do download:woo-commerce-zip latest
./do download:woo-commerce-subscriptions-zip 4.9.1
./do download:woo-commerce-memberships-zip 1.24.0
./do download:woo-commerce-blocks-zip 9.6.2
./do download:automate-woo-zip 5.6.8
- run:
name: Dump tests ENV variables for acceptance tests
command: |
@ -207,11 +206,12 @@ jobs:
- attach_workspace:
at: /home/circleci
- add_ssh_keys
- run:
name: 'Add GitHub to known_hosts'
<<: *command_add_github_key
- run:
name: 'Install Premium plugin'
command: |
# Add GitHub to known_hosts because there is no checkout step in this job
echo "github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==" >> ~/.ssh/known_hosts
git clone ${MAILPOET_PREMIUM_REPO_URL} mailpoet-premium
- restore_cache:
key: premium-tools-{{ checksum "mailpoet-premium/tools/install.php" }}
@ -256,6 +256,26 @@ jobs:
- run:
name: 'Static analysis'
command: ./do qa:phpstan --php-version=<< parameters.php_version >>
security_analysis:
working_directory: /home/circleci/mailpoet/mailpoet
machine:
image: ubuntu-2204:2022.10.2
docker_layer_caching: false
steps:
- attach_workspace:
at: /home/circleci
- add_ssh_keys
- run:
name: 'Add GitHub to known_hosts'
<<: *command_add_github_key
- run:
name: 'Set up PHP'
command: |
sudo apt update
sudo apt install -y php8.1-cli
- run:
name: 'QA Security'
command: ./do qa:semgrep
qa_js:
executor: wpcli_php_latest
working_directory: /home/circleci/mailpoet/mailpoet
@ -318,7 +338,8 @@ jobs:
parallelism: 20
working_directory: /home/circleci/mailpoet/mailpoet
machine:
image: ubuntu-2204:2022.07.1
image: ubuntu-2204:2022.10.2
docker_layer_caching: false
parameters:
multisite:
type: integer
@ -329,7 +350,7 @@ jobs:
mysql_command:
type: string
default: ''
mysql_image_version:
mysql_image:
type: string
default: ''
codeception_image_version:
@ -350,18 +371,18 @@ jobs:
woo_blocks_version:
type: string
default: ''
automate_woo_version:
type: string
default: ''
enable_cot:
type: integer
default: 0
enable_cot_sync:
type: integer
default: 0
allow_fail:
type: integer
default: 0
environment:
MYSQL_COMMAND: << parameters.mysql_command >>
MYSQL_IMAGE_VERSION: << parameters.mysql_image_version >>
MYSQL_IMAGE: << parameters.mysql_image >>
CODECEPTION_IMAGE_VERSION: << parameters.codeception_image_version >>
WORDPRESS_IMAGE_VERSION: << parameters.wordpress_image_version >>
steps:
@ -406,11 +427,21 @@ jobs:
command: |
cd tests/docker
docker-compose run --rm -w /project --entrypoint "./do download:woo-commerce-blocks-zip << parameters.woo_blocks_version >>" --no-deps -e WP_GITHUB_USERNAME=${WP_GITHUB_USERNAME} -e WP_GITHUB_TOKEN=${WP_GITHUB_TOKEN} codeception_acceptance
- when:
condition: << parameters.automate_woo_version >>
steps:
- run:
name: Download AutomateWoo
command: |
cd tests/docker
docker-compose run --rm -w /project --entrypoint "./do download:automate-woo-zip << parameters.automate_woo_version >>" --no-deps -e WP_GITHUB_USERNAME=${WP_GITHUB_USERNAME} -e WP_GITHUB_TOKEN=${WP_GITHUB_TOKEN} codeception_acceptance
- run:
name: Group acceptance tests
command: |
# Convert test result filename values to be relative paths because the circleci CLI's split command requires exact matches
sed -i.bak 's#/wp-core/wp-content/plugins/mailpoet/##g' $CIRCLE_INTERNAL_TASK_DATA/circle-test-results/results.json
if [ -e $CIRCLE_INTERNAL_TASK_DATA/circle-test-results/results.json ]; then
sed -i.bak 's#/wp-core/wp-content/plugins/mailpoet/##g' $CIRCLE_INTERNAL_TASK_DATA/circle-test-results/results.json
fi
# `circleci tests split` returns different values based on the container it's run on
# in case group is defined find only tests containing the group
if [[ -n '<< parameters.group >>' ]]; then
@ -419,6 +450,12 @@ jobs:
circleci tests glob "tests/acceptance/**/*Cest.php" | circleci tests split --split-by=timings > tests/acceptance/_groups/circleci_split_group
fi
cat tests/acceptance/_groups/circleci_split_group
- run:
name: Create docker containers for test
# We experienced some failures when creating containers so we do it explicitly with one retry
command: |
cd tests/docker
docker-compose create || docker-compose create
- run:
name: Run acceptance tests
command: |
@ -432,9 +469,6 @@ jobs:
--xml
-g circleci_split_group
)
if [[ << parameters.allow_fail >> == 1 ]]; then
args+=(--no-exit)
fi
docker-compose run -e SKIP_DEPS=1 \
-e CIRCLE_BRANCH=${CIRCLE_BRANCH} \
-e CIRCLE_JOB=${CIRCLE_JOB} \
@ -442,22 +476,78 @@ jobs:
-e ENABLE_COT=<< parameters.enable_cot >> \
-e ENABLE_COT_SYNC=<< parameters.enable_cot_sync >> \
codeception_acceptance "${args[@]}"
- when:
condition:
not:
equal: [1, << parameters.allow_fail >>]
steps:
- run:
name: Check exceptions
command: |
if [ "$(ls tests/_output/exceptions/*.html)" ]; then
echo "There were some exceptions during the tests run"
exit 1
fi
- run:
name: Check exceptions
command: |
if [ "$(ls tests/_output/exceptions/*.html)" ]; then
echo "There were some exceptions during the tests run"
exit 1
fi
- store_artifacts:
path: tests/_output
- store_test_results:
path: tests/_output
performance_tests:
working_directory: /home/circleci/mailpoet/mailpoet
machine:
image: ubuntu-2204:2022.10.2
docker_layer_caching: false
parameters:
mysql_command:
type: string
default: ''
mysql_image:
type: string
default: ''
wordpress_image_version:
type: string
default: ''
url:
type: string
default: 'http://localhost:9500'
pw:
type: string
default: 'password'
scenario:
type: string
default: 'pullrequests'
steps:
- attach_workspace:
at: /home/circleci
- run:
name: 'Set up PHP'
command: |
sudo apt update
sudo apt install -y php8.1-cli
- run:
name: 'Pull test docker images'
# Pull docker images with 3 retries
command: i='0';while ! docker-compose -f tests/performance/docker-compose.yml pull && ((i < 3)); do sleep 3 && i=$[$i+1]; done
- run:
name: Create docker containers for test
# We experienced some failures when creating containers so we do it explicitly with one retry
command: |
cd tests/performance
docker-compose create || docker-compose create
- run:
name: Run performance tests
command: |
mkdir -p tests/performance/_output
mkdir -p tests/performance/_screenshots
./do test:performance --url=<< parameters.url >> --pw=<< parameters.pw >> --scenario=<< parameters.scenario >>
- run:
name: Check exceptions
command: |
if [ "$(ls tests/performance/_output/exceptions/*.html)" ]; then
echo "There were some exceptions during the tests run"
exit 1
fi
- store_artifacts:
path: tests/performance/_output
- store_artifacts:
path: tests/performance/_screenshots
- store_test_results:
path: tests/performance/_output
unit_tests:
working_directory: /home/circleci/mailpoet/mailpoet
parameters:
@ -492,9 +582,12 @@ jobs:
integration_tests:
working_directory: /home/circleci/mailpoet/mailpoet
machine:
image: ubuntu-2204:2022.07.1
image: ubuntu-2204:2022.10.2
docker_layer_caching: false
environment:
CODECEPTION_IMAGE_VERSION: << parameters.codeception_image_version >>
MYSQL_COMMAND: << parameters.mysql_command >>
MYSQL_IMAGE: << parameters.mysql_image >>
parameters:
codeception_image_version:
type: string
@ -517,12 +610,12 @@ jobs:
multisite:
type: integer
default: 0
woo_core_version:
mysql_command:
type: string
default: ''
mysql_image:
type: string
default: ''
allow_fail:
type: integer
default: 0
steps:
- attach_workspace:
at: /home/circleci
@ -530,14 +623,12 @@ jobs:
name: 'Pull test docker images'
# Pull docker images with 3 retries
command: i='0';while ! docker-compose -f tests/docker/docker-compose.yml pull && ((i < 3)); do sleep 3 && i=$[$i+1]; done
- when:
condition: << parameters.woo_core_version >>
steps:
- run:
name: Download WooCommerce Core
command: |
cd tests/docker
docker-compose run --rm -w /project --entrypoint "./do download:woo-commerce-zip << parameters.woo_core_version >>" --no-deps codeception_integration
- run:
name: Create docker containers for test
# We experienced some failures when creating containers so we do it explicitly with one retry
command: |
cd tests/docker
docker-compose create || docker-compose create
- run:
name: 'PHP Integration tests'
command: |
@ -556,9 +647,6 @@ jobs:
if [[ -n '<< parameters.skip_group >>' ]]; then
args+=(--skip-group << parameters.skip_group >>)
fi
if [[ << parameters.allow_fail >> == 1 ]]; then
args+=(--no-exit)
fi
docker-compose run -e SKIP_DEPS=1 \
-e CIRCLE_BRANCH=${CIRCLE_BRANCH} \
-e CIRCLE_JOB=${CIRCLE_JOB} \
@ -633,6 +721,10 @@ workflows:
php_version: 80000
requires:
- build
- security_analysis:
<<: *slack-fail-post-step
requires:
- build
- qa_js:
<<: *slack-fail-post-step
requires:
@ -651,7 +743,7 @@ workflows:
- build
- acceptance_tests:
<<: *slack-fail-post-step
name: acceptance_tests
name: acceptance_tests_base_and_woo_cot_off
requires:
- unit_tests
- static_analysis_php8
@ -659,13 +751,10 @@ workflows:
- qa_php
- acceptance_tests:
<<: *slack-fail-post-step
<<: *only_trunk_and_cot
name: acceptance_tests_woo_cot_sync
group: woo
enable_cot: 1
enable_cot_sync: 1
allow_fail: 1
woo_core_version: woo-cot-beta # Temporarily force COT beta version
requires:
- unit_tests
- static_analysis_php8
@ -673,24 +762,18 @@ workflows:
- qa_php
- acceptance_tests:
<<: *slack-fail-post-step
<<: *only_trunk_and_cot
name: acceptance_tests_woo_cot_no_sync
group: woo
enable_cot: 1
enable_cot_sync: 0
allow_fail: 1
woo_core_version: woo-cot-beta # Temporarily force COT beta version
requires:
- unit_tests
- static_analysis_php8
- qa_js
- qa_php
- acceptance_tests:
- performance_tests:
<<: *slack-fail-post-step
<<: *only_trunk_and_cot
name: acceptance_tests_woo_cot_off
group: woo
woo_core_version: woo-cot-beta # Temporarily force COT beta version
name: performance_tests
requires:
- unit_tests
- static_analysis_php8
@ -703,20 +786,8 @@ workflows:
- integration_tests:
<<: *slack-fail-post-step
group: woo
name: integration_test_woocommerce
requires:
- unit_tests
- static_analysis_php8
- qa_js
- qa_php
- integration_tests:
<<: *slack-fail-post-step
<<: *only_trunk_and_cot
group: woo
enable_cot: 1
enable_cot_sync: 1
allow_fail: 1
woo_core_version: woo-cot-beta # Temporarily force COT beta version
name: integration_test_woo_cot_sync
requires:
- unit_tests
@ -725,12 +796,9 @@ workflows:
- qa_php
- integration_tests:
<<: *slack-fail-post-step
<<: *only_trunk_and_cot
group: woo
enable_cot: 1
enable_cot_sync: 0
allow_fail: 1
woo_core_version: woo-cot-beta # Temporarily force COT beta version
name: integration_test_woo_cot_no_sync
requires:
- unit_tests
@ -739,9 +807,7 @@ workflows:
- qa_php
- integration_tests:
<<: *slack-fail-post-step
<<: *only_trunk_and_cot
group: woo
woo_core_version: woo-cot-beta # Temporarily force COT beta version
name: integration_test_woo_cot_off
requires:
- unit_tests
@ -777,10 +843,15 @@ workflows:
<<: *slack-fail-post-step
requires:
- build
- acceptance_tests
- acceptance_tests_base_and_woo_cot_off
- js_tests
- integration_test_woocommerce
- integration_test_base
- integration_test_woo_cot_no_sync
- integration_test_woo_cot_off
- integration_test_woo_cot_sync
- acceptance_tests_woo_cot_sync
- acceptance_tests_woo_cot_no_sync
- performance_tests
nightly:
triggers:
@ -800,19 +871,29 @@ workflows:
woo_subscriptions_version: latest
woo_memberships_version: latest
woo_blocks_version: latest
automate_woo_version: latest
requires:
- build
- acceptance_tests:
<<: *slack-fail-post-step
name: acceptance_oldest
woo_core_version: 6.2.2
woo_core_version: 7.3.0
woo_subscriptions_version: 4.3.0
woo_memberships_version: 1.21.0
woo_blocks_version: 5.3.2
mysql_command: --max_allowed_packet=100M
mysql_image_version: 5.7.36
codeception_image_version: 7.4-cli_20210126.1
wordpress_image_version: wp-5.6_php7.2_20220406.1
woo_blocks_version: 6.8.0
automate_woo_version: 5.1.1
mysql_command: --max_allowed_packet=100M --default-storage-engine=MYISAM
mysql_image: mysql:5.5
codeception_image_version: 7.4-cli_20220605.0
wordpress_image_version: wp-6.0_php7.4_20230425.1
requires:
- build
- performance_tests:
<<: *slack-fail-post-step
name: performance_latest
url: https://qawp.net
pw: $WP_TEST_PERFORMANCE_PW
scenario: nightlytests
requires:
- build
- unit_tests:
@ -835,6 +916,8 @@ workflows:
<<: *slack-fail-post-step
name: integration_oldest
codeception_image_version: 7.2-cli_20220605.0
mysql_command: --max_allowed_packet=100M --default-storage-engine=MYISAM
mysql_image: mysql:5.5
requires:
- build
- build_premium:

16
.github/workflows/stats.yml vendored Normal file
View File

@ -0,0 +1,16 @@
name: Pull Request Stats
on:
pull_request:
types: [opened]
jobs:
stats:
runs-on: ubuntu-latest
steps:
- name: Run pull request stats
uses: flowwer-dev/pull-request-stats@master
with:
period: 90
charts: true
sort-by: 'TIME'

1
.gitignore vendored
View File

@ -7,4 +7,5 @@ docker-compose.override.yml
node_modules
npm-debug.log
mailpoet-premium
tsconfig.tsbuildinfo
wordpress

1
.npmrc
View File

@ -1,2 +1,3 @@
save-workspace-protocol=rolling
strict-peer-dependencies=false
resolve-peers-from-workspace-root=true

2
.nvmrc
View File

@ -1 +1 @@
v17.9.1
v19.7.0

View File

@ -22,6 +22,7 @@ vendor-prefixed
/mailpoet/temp
/mailpoet/tests/javascript_newsletter_editor/testBundles
/mailpoet/tests/plugins
/mailpoet/tools/wpscan-semgrep-rules
/mailpoet/views
/mailpoet-premium
/wordpress

View File

@ -126,23 +126,24 @@ You can access this help in your command line running `./do` without parameters.
[Read the article.](https://mailpoet.atlassian.net/wiki/spaces/MAILPOET/pages/629374977/Adding+new+templates+to+the+plugin)
## 🚥 Testing with PHP 7.4 or PHP 8.0
## 🚥 Testing with different PHP versions
To switch the environment to PHP 7.4/8.0:
To switch the environment to a different PHP version:
1. Configure the `wordpress` service in `docker-compose.override.yml` to build from the php74 Dockerfile:
1. Check https://github.com/mailpoet/mailpoet/tree/trunk/dev for a list of available PHP versions. Each directory starting with `php` corresponds to a available version.
2. Configure the `wordpress` service in `docker-compose.override.yml` to build from the desired PHP version Dockerfile (replace {PHP_VERSION} with the name of the directory that corresponds to the version that you want to use):
```yaml
wordpress:
build:
context: .
dockerfile: dev/php74/Dockerfile # OR dev/php80/Dockerfile
dockerfile: dev/{PHP_VERSION}/Dockerfile
```
2. Run `docker-compose build wordpress`.
3. Start the stack with `./do start`.
3. Run `docker-compose build wordpress`.
4. Start the stack with `./do start`.
To switch back to PHP 8.1 remove what was added in 1) and, run `docker-compose build wordpress` for application container and `docker-compose build test_wordpress` for tests container,
To switch back to the default PHP version remove what was added in 2) and, run `docker-compose build wordpress` for application container and `docker-compose build test_wordpress` for tests container,
and start the stack using `./do start`.
## ✅ TODO

8
babel.config.js Normal file
View File

@ -0,0 +1,8 @@
export default {
presets: [
['@babel/preset-react', { runtime: 'automatic' }],
'@babel/preset-env',
'@babel/preset-typescript',
],
plugins: [['@babel/plugin-transform-runtime']],
};

View File

@ -10,7 +10,7 @@ RUN apt-get update \
&& pecl install xdebug-2.9.8 && \
\
# Install NodeJS, enable Corepack
curl -sL https://deb.nodesource.com/setup_17.x | bash - && \
curl -sL https://deb.nodesource.com/setup_19.x | bash - && \
apt-get install -y nodejs build-essential && \
corepack enable && \
\

View File

@ -8,7 +8,7 @@ RUN apt-get update \
&& apt-get install -y git zlib1g-dev libzip-dev zip wget gnupg msmtp libpng-dev gettext subversion \
&& \
# Install NodeJS, enable Corepack
curl -sL https://deb.nodesource.com/setup_17.x | bash - && \
curl -sL https://deb.nodesource.com/setup_19.x | bash - && \
apt-get install -y nodejs build-essential && \
corepack enable && \
\

View File

@ -8,7 +8,7 @@ RUN apt-get update \
&& apt-get install -y git zlib1g-dev libzip-dev zip wget gnupg msmtp libpng-dev gettext subversion \
&& \
# Install NodeJS, enable Corepack
curl -sL https://deb.nodesource.com/setup_17.x | bash - && \
curl -sL https://deb.nodesource.com/setup_19.x | bash - && \
apt-get install -y nodejs build-essential && \
corepack enable && \
\

46
dev/php82/Dockerfile Normal file
View File

@ -0,0 +1,46 @@
FROM php:8.2.0RC6-apache
ARG UID=1000
ARG GID=1000
# additinal extensions
RUN apt-get update \
&& apt-get install -y git zlib1g-dev libzip-dev zip wget gnupg msmtp libpng-dev gettext subversion \
&& \
# Install NodeJS, enable Corepack
curl -sL https://deb.nodesource.com/setup_19.x | bash - && \
apt-get install -y nodejs build-essential && \
corepack enable && \
\
# Install WP-CLI
curl -o /usr/local/bin/wp https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && \
chmod +x /usr/local/bin/wp && \
\
# Clean up
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY dev/php.ini /usr/local/etc/php/conf.d/php_user.ini
# msmtp config
RUN printf "account default\nhost smtp\nport 1025" > /etc/msmtprc
# xdebug build an config
ENV XDEBUGINI_PATH=/usr/local/etc/php/conf.d/xdebug.ini
RUN git clone -b "3.2.0RC2" --depth 1 https://github.com/xdebug/xdebug.git /usr/src/php/ext/xdebug \
&& docker-php-ext-configure xdebug --enable-xdebug-dev \
&& docker-php-ext-install xdebug \
&& mkdir /tmp/debug
COPY dev/xdebug.ini /tmp/xdebug.ini
RUN cat /tmp/xdebug.ini >> $XDEBUGINI_PATH
# php extensions
RUN docker-php-ext-install pdo_mysql
RUN docker-php-ext-install mysqli
# allow .htaccess files (between <Directory /var/www/> and </Directory>, which is WordPress installation)
RUN sed -i '/<Directory \/var\/www\/>/,/<\/Directory>/ s/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf
# ensure existing content in /var/www/html respects UID and GID, give Node permissions for Corepack
RUN chown -R ${UID}:${GID} /var/www/html && \
mkdir -p /.node && chown -R ${UID}:${GID} /.node

View File

@ -28,6 +28,7 @@ Class `\MailPoet\API\API` becomes available once MailPoet plugin is loaded by Wo
- [Add List (addList)](api_methods/AddList.md)
- [Add Subscriber (addSubscriber)](api_methods/AddSubscriber.md)
- [Add Subscriber Field (addSubscriberField)](api_methods/AddSubscriberField.md)
- [Delete List (deleteList)](api_methods/DeleteList.md)
- [Get Lists (getLists)](api_methods/GetLists.md)
- [Get Subscriber (getSubscriber)](api_methods/GetSubscriber.md)
- [Get Subscribers (getSubscribers)](api_methods/GetSubscribers.md)
@ -36,8 +37,10 @@ Class `\MailPoet\API\API` becomes available once MailPoet plugin is loaded by Wo
- [Is Setup Complete (isSetupComplete)](api_methods/IsSetupComplete.md)
- [Subscribe to List (subscribeToList)](api_methods/SubscribeToList.md)
- [Subscribe to Lists (subscribeToLists)](api_methods/SubscribeToLists.md)
- [Unsubscribe globally](api_methods/UnsubscribeGlobally.md)
- [Unsubscribe from List (unsubscribeFromList)](api_methods/UnsubscribeFromList.md)
- [Unsubscribe from Lists (unsubscribeFromLists)](api_methods/UnsubscribeFromLists.md)
- [Update List (updateList)](api_methods/UpdateList.md)
### Usage examples

View File

@ -0,0 +1,27 @@
[back to list](../Readme.md)
# Delete List
## `bool deleteList(string $list_id)`
This method provides functionality for deleting a list that is of the type 'default'.
It returns a boolean value.
## Error handling
All expected errors from the API are exceptions of class `\MailPoet\API\MP\v1\APIException`.
Code of the exception is populated to distinguish between different errors.
An exception of base class `\Exception` can be thrown when something unexpected happens.
Codes description:
| Code | Description |
| ---- | --------------------------------------------------------------- |
| 5 | List does not exist |
| 18 | List id is empty |
| 20 | List cannot be deleted because its used for an automatic email |
| 21 | List cannot be deleted because its used for a form |
| 22 | The list couldnt be deleted from the database |
| 23 | Only lists of the type 'default' can be deleted |

View File

@ -18,8 +18,8 @@ This method returns a list of subscribers. To see the subscriber data structure,
Filter argument supports following array keys.
| Key | Type | Description |
| -------------- | ------------ | ----------------------------------------------------------------------------------------------------------------- |
| status | string | Specific status of subscribers. One of values: `unconfirmed`, `subscribed`, `unsubscribed`, `bounced`, `inactive` |
| list_id | int | List id or dynamic segment id |
| min_updated_at | DateTime\int | DateTime object or timestamp of the minimal last update of subscribers |
| Key | Type | Description |
| ------------ | ------------ | ----------------------------------------------------------------------------------------------------------------- |
| status | string | Specific status of subscribers. One of values: `unconfirmed`, `subscribed`, `unsubscribed`, `bounced`, `inactive` |
| listId | int | List id or dynamic segment id |
| minUpdatedAt | DateTime\int | DateTime object or timestamp of the minimal last update of subscribers |

View File

@ -0,0 +1,29 @@
[back to list](../Readme.md)
# Unsubscribe from all lists and change subscriber status
## `array unsubscribe(string $subscriber_id)`
This method removes a subscriber from all lists and updates its status to 'unsubscribed'.
It returns a subscriber. See [Get Subscriber](GetSubscriber.md) for returned data structure.
## Arguments
### string `$subscriber_id` (required)
An id or email of an existing subscriber. An `\Exception` is thrown when an id or email doesn't match any subscriber.
## Error handling
All expected errors from the API are exceptions of class `\MailPoet\API\MP\v1\APIException`.
Code of the exception is populated to distinguish between different errors.
An exception of base class `\Exception` can be thrown when something unexpected happens.
Codes description:
| Code | Description |
| ---- | -------------------------------------------- |
| 4 | Invalid subscriber that does not exist |
| 24 | Subscriber already has 'unsubscribed' status |

View File

@ -0,0 +1,39 @@
[back to list](../Readme.md)
# Add Subscriber
## `array updateList(array $list)`
This method provides functionality for updating a list name or description. Only lists of type 'default' are supported.
It returns the updated list. See [Get Lists](GetLists.md) for a list data structure description.
## Arguments
### `$list` (required)
An associative array which contains list data.
| Property | Type | Limits | Description |
| ---------------------- | ------------ | --------- | -------------------------- |
| id (required) | string | 11 chars | A id of the list. |
| name (required) | string | 90 chars | A name of the list. |
| description (optional) | string\|null | 250 chars | A description of the list. |
## Error handling
All expected errors from the API are exceptions of class `\MailPoet\API\MP\v1\APIException`.
Code of the exception is populated to distinguish between different errors.
An exception of base class `\Exception` can be thrown when something unexpected happens.
Codes description:
| Code | Description |
| ---- | ----------------------------------------------- |
| 5 | The list was not found by id |
| 14 | Missing list name |
| 15 | Trying to use a list name that is already used |
| 18 | Missing list id |
| 19 | The list couldnt be updated in the database |
| 23 | Only lists of the type 'default' can be updated |

View File

@ -15,6 +15,7 @@ services:
volumes:
- my-datavolume:/var/lib/mysql
- ./dev/database/create_test_db.sh:/docker-entrypoint-initdb.d/10-create_test_db.sh
command: --sql_mode=STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,ANSI,ONLY_FULL_GROUP_BY
environment:
MYSQL_ROOT_PASSWORD: somewordpress
MYSQL_DATABASE: wordpress
@ -46,6 +47,7 @@ services:
PHP_IDE_CONFIG: 'serverName=Mailpoet'
COMPOSER_HOME: '/tmp/.composer'
NPM_CONFIG_CACHE: '/tmp/.npm'
XDG_CACHE_HOME: '/tmp/.cache'
MAILPOET_DEV_SITE: 1
volumes:
- './wordpress:/var/www/html'

View File

@ -1,11 +1,10 @@
{
"presets": [
"@babel/preset-typescript",
["@babel/preset-react", { "runtime": "automatic" }],
"@babel/preset-env"
"@babel/preset-env",
["@babel/preset-typescript", { "allowDeclareFields": true }]
],
"plugins": [
"babel-plugin-typescript-to-proptypes",
[
"@babel/plugin-transform-runtime",
{

View File

@ -37,3 +37,10 @@ WP_GITHUB_TOKEN=
# Jira username/email and a token from https://id.atlassian.com/manage/api-tokens:
WP_JIRA_USER=
WP_JIRA_TOKEN=
# k6 performance test suite
# Get following secrets from the Secret Store, look for "MailPoet: plugin .env":
WP_TEST_PERFORMANCE_DATA_URL=
WP_TEST_PERFORMANCE_PW=
K6_CLOUD_TOKEN=
K6_CLOUD_ID=

View File

@ -1,3 +0,0 @@
**/vendor/**
**/vendor-prefixed/**
**/testBundles/**

View File

@ -1 +0,0 @@
v17.9.1

View File

@ -90,7 +90,6 @@ $ ./do test:debug-unit # alias for ./do test:unit --debug
$ ./do test:debug-integration # alias for ./do test:integration --debug
$ ./do test:failed-unit # run the last failing unit test.
$ ./do test:failed-integration # run the last failing integration test.
$ ./do test:coverage # run tests and output coverage information.
$ ./do test:javascript # run the JS tests.
$ ./do test:acceptance [--file=...] [--skip-deps]
# run acceptances tests into a docker environment.

View File

@ -1,4 +1,4 @@
<?php
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
// phpcs:disable PSR1.Classes.ClassDeclaration
// phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace
@ -117,11 +117,48 @@ class RoboFile extends \Robo\Tasks {
}
public function translationsBuild() {
$exclude = implode(',', [
'.mp_svn',
'assets/css',
'assets/img',
'assets/js',
'generated',
'lang',
'lib-3rd-party',
'mailpoet-premium',
'node_modules',
'plugin_repository',
'prefixer',
'tasks',
'temp',
'tests',
'tools',
'vendor',
'vendor-prefixed',
'RoboFile.php',
'.storybook',
'storybook-static',
]);
$headers = escapeshellarg(
json_encode([
'Report-Msgid-Bugs-To' => 'http://support.mailpoet.com/',
'Last-Translator' => 'MailPoet i18n (https://www.transifex.com/organization/wysija)',
'Language-Team' => 'MailPoet i18n <https://www.transifex.com/organization/wysija>',
'Plural-Forms' => 'nplurals=2; plural=(n != 1);',
])
);
$this->collectionBuilder()
->taskExec('mkdir -p ' . __DIR__ . '/lang')
->taskExec(
'php -d memory_limit=-1 tasks/makepot/grunt-makepot.php wp-plugin . lang/mailpoet.pot mailpoet .mp_svn,assets,lang,node_modules,plugin_repository,tasks,tests,vendor'
)->run();
// HTML, HBS
->taskExec("php -d memory_limit=-1 tasks/makepot/makepot-views.php . > lang/mailpoet.pot")
// PHP, JS/TS
->taskExec("php -d memory_limit=-1 vendor/wp-cli/wp-cli/php/boot-fs.php i18n make-pot --merge --slug=mailpoet --domain=mailpoet --exclude=$exclude --headers=$headers . lang/mailpoet.pot")
->run();
}
public function translationsGetPotFileFromBuild() {
@ -184,7 +221,7 @@ class RoboFile extends \Robo\Tasks {
return $this->_exec($command);
}
public function testIntegration(array $opts = ['file' => null, 'group' => null, 'skip-group' => null, 'xml' => false, 'multisite' => false, 'debug' => false, 'skip-deps' => false, 'skip-plugins' => false, 'enable-cot' => false, 'enable-cot-sync' => false]) {
public function testIntegration(array $opts = ['file' => null, 'group' => null, 'skip-group' => null, 'xml' => false, 'multisite' => false, 'debug' => false, 'skip-deps' => false, 'skip-plugins' => false, 'enable-cot' => false, 'enable-cot-sync' => false, 'stop-on-fail' => false]) {
return $this->runTestsInContainer(array_merge($opts, ['test_type' => 'integration']));
}
@ -200,21 +237,6 @@ class RoboFile extends \Robo\Tasks {
return $this->runTestsInContainer(array_merge($opts, ['test_type' => 'integration', 'skip-group' => 'woo', 'skip-deps' => true, 'skip-plugins' => true]));
}
public function testCoverage($opts = ['file' => null, 'xml' => false]) {
$command = join(' ', [
'vendor/bin/codecept run -s acceptance',
(($opts['file']) ? $opts['file'] : ''),
'--coverage',
($opts['xml']) ? '--coverage-xml' : '--coverage-html',
]);
if ($opts['xml']) {
$command .= ' --xml';
}
return $this->execWithXDebug($command);
}
public function testNewsletterEditor($xmlOutputFile = null) {
$command = join(' ', [
'./node_modules/.bin/mocha',
@ -263,6 +285,80 @@ class RoboFile extends \Robo\Tasks {
return $this->runTestsInContainer($opts);
}
public function testPerformance($path = null, $opts = ['url' => null, 'pw' => null, 'head' => false, 'scenario' => null]) {
$dir = __DIR__;
if ((getenv('K6_CLOUD_TOKEN')) === false) {
return $this->collectionBuilder()
->addCode([$this, 'testPerformanceSetup'])
->taskExec("php $dir/tools/k6.php")
->arg('run')
->option('env', 'K6_BROWSER_ENABLED=1')
->option('env', 'URL=' . $opts['url'])
->option('env', 'PW=' . $opts['pw'])
->option('env', 'HEADLESS=' . ($opts['head'] ? 'false' : 'true'))
->option('env', 'SCENARIO=' . $opts['scenario'])
->arg($path ?? "$dir/tests/performance/scenarios.js")
->dir($dir)->run();
} else {
return $this->collectionBuilder()
->addCode([$this, 'testPerformanceSetup'])
->taskExec("php $dir/tools/k6.php")
->arg('run')
->option('env', 'K6_BROWSER_ENABLED=1')
->option('env', 'URL=' . $opts['url'])
->option('env', 'PW=' . $opts['pw'])
->option('env', 'HEADLESS=' . ($opts['head'] ? 'false' : 'true'))
->option('env', 'SCENARIO=' . $opts['scenario'])
->option('env', 'K6_CLOUD_TOKEN=' . getenv('K6_CLOUD_TOKEN'))
->option('env', 'K6_CLOUD_ID=' . getenv('K6_CLOUD_ID'))
->option('env', 'K6_PROJECT_NAME=' . $opts['scenario'])
->option('out', 'cloud')
->arg($path ?? "$dir/tests/performance/scenarios.js")
->dir($dir)->run();
}
}
public function testPerformanceSetup() {
// get data file URL
$url = getenv('WP_TEST_PERFORMANCE_DATA_URL');
if (!$url) {
$this->yell("Please set 'WP_TEST_PERFORMANCE_DATA_URL'. You'll find it in the secret store.", 40, 'red');
exit(1);
}
// download data
$dataFile = __DIR__ . '/tests/performance/_data/data.sql';
if (!file_exists($dataFile)) {
$this->say('Downloading data file...');
if (!is_dir(dirname($dataFile))) {
mkdir(dirname($dataFile), 0777, true);
}
$source = gzopen($url, 'rb');
$destination = fopen($dataFile, 'wb');
while (!gzeof($source)) {
fwrite($destination, gzread($source, 4096));
}
fclose($destination);
gzclose($source);
$this->say("Data file downloaded to: $dataFile");
} else {
$this->say("Data file already exists: $dataFile");
}
// import data & run WordPress setup
$this->say('Importing data and running a WordPress setup...');
$this->taskExec('COMPOSE_HTTP_TIMEOUT=200 docker-compose run --rm -it setup')
->dir(__DIR__ . '/tests/performance')
->run();
$this->say('Data imported, WordPress set up.');
}
public function testPerformanceClean() {
$this->taskExec('COMPOSE_HTTP_TIMEOUT=200 docker-compose down --remove-orphans -v')
->dir(__DIR__ . '/tests/performance')
->run();
}
public function testAcceptanceMultisite($opts = ['file' => null, 'skip-deps' => false, 'group' => null, 'timeout' => null, 'enable-cot' => false, 'enable-cot-sync' => false]) {
return $this->runTestsInContainer(array_merge($opts, ['multisite' => true]));
}
@ -351,6 +447,25 @@ class RoboFile extends \Robo\Tasks {
$this->say("Validator metadata generated to: $validatorMetadataDir");
}
public function migrationsNew() {
$generator = new \MailPoet\Migrator\Repository();
$result = $generator->create();
$path = realpath($result['path']);
$this->output->writeln('MAILPOET DATABASE MIGRATIONS');
$this->output->writeln("============================\n");
$this->output->writeln("New migration created ✔\n");
$this->output->writeln(" Name: {$result['name']}");
$this->output->writeln(" Path: $path");
}
public function migrationsStatus() {
return $this->taskExec('vendor/bin/wp mailpoet:migrations:status');
}
public function migrationsRun() {
return $this->taskExec('vendor/bin/wp mailpoet:migrations:run');
}
public function qa() {
$collection = $this->collectionBuilder();
$collection->addCode([$this, 'qaPhp']);
@ -372,6 +487,9 @@ class RoboFile extends \Robo\Tasks {
$collection->addCode(function() {
return $this->qaCodeSniffer([]);
});
$collection->addCode(function() {
return $this->qaMinimalPluginStandard([]);
});
return $collection->run();
}
@ -399,8 +517,8 @@ class RoboFile extends \Robo\Tasks {
'lib-3rd-party/',
'vendor/composer',
'vendor/mtdowling',
'vendor/soundasleep',
'vendor-prefixed/',
'vendor-prefixed/soundasleep',
'mailpoet.php',
]);
// The list of files and folders to exclude is coming from build.sh
@ -418,7 +536,7 @@ class RoboFile extends \Robo\Tasks {
'vendor/phpmailer/phpmailer/test',
'vendor-prefixed/psr/log/Psr/Log/Test',
'vendor-prefixed/sabberworm/php-css-parser/tests',
'vendor/soundasleep/html2text/tests',
'vendor-prefixed/soundasleep/html2text/tests',
'vendor-prefixed/swiftmailer/swiftmailer/tests',
'vendor-prefixed/symfony/service-contracts/Tests',
'vendor-prefixed/symfony/translation/Tests',
@ -448,7 +566,56 @@ class RoboFile extends \Robo\Tasks {
'./tasks/code_sniffer/vendor/bin/phpcs',
'--extensions=php',
$severityFlag,
'--standard=tasks/code_sniffer/MailPoet',
'--standard=tasks/code_sniffer/MailPoet/free-ruleset.xml',
'-s',
]);
$ignorePaths = [
'.mp_svn',
'assets',
'doc',
'generated',
'lib/Config/PopulatorData/Templates',
'lib-3rd-party',
'node_modules',
'plugin_repository',
'prefixer/build',
'prefixer/vendor',
'tasks/code_sniffer/vendor',
'tasks/phpstan/vendor',
'tasks/makepot',
'tools/vendor',
'temp',
'tests/_data',
'tests/_output',
'tests/_support/_generated',
'vendor',
'vendor-prefixed',
'views',
];
// the "--ignore" arg takes a list of regexes, we need to anchor and escape them
$ignorePatterns = array_map(function (string $path): string {
return '^' . preg_quote(__DIR__ . DIRECTORY_SEPARATOR . $path);
}, $ignorePaths);
$stringFilesToCheck = !empty($filesToCheck) ? implode(' ', $filesToCheck) : '.';
return $this->taskExec($task)
->arg('--ignore=' . implode(',', $ignorePatterns))
->rawArg($stringFilesToCheck)
->run();
}
public function qaMinimalPluginStandard(array $filesToCheck, $opts = ['severity' => 'all']) {
$severityFlag = $opts['severity'] === 'all' ? '-w' : '-n';
$task = implode(' ', [
'php -d memory_limit=-1',
'./tasks/code_sniffer/vendor/bin/phpcs',
'--extensions=php',
$severityFlag,
'--standard=tasks/code_sniffer/vendor/wporg/plugin-directory/MinimalPluginStandard',
'-s',
]);
@ -491,7 +658,8 @@ class RoboFile extends \Robo\Tasks {
}
public function qaFixFile($filePath) {
if (substr($filePath, -4) === '.php') {
$extension = pathinfo($filePath, PATHINFO_EXTENSION);
if ($extension === 'php') {
// fix PHPCS rules
return $this->collectionBuilder()
->taskExec(
@ -502,48 +670,10 @@ class RoboFile extends \Robo\Tasks {
)
->run();
}
if (substr($filePath, -4) === '.jsx') {
// fix ESLint using ES6 rules
if (in_array($extension, ['js', 'jsx', 'ts', 'tsx'], true)) {
// fix ESLint rules
return $this->collectionBuilder()
->taskExec(
'npx ../eslint-config/node_modules/.bin/eslint -c ../eslint-config/.eslintrc.es6.json ' .
'--max-warnings 0 ' .
'--fix ' .
$filePath
)
->run();
}
if (substr($filePath, -4) === '.tsx' || substr($filePath, -3) === '.ts') {
// fix ESLint using TS rules
return $this->collectionBuilder()
->taskExec(
'npx ../eslint-config/node_modules/.bin/eslint -c ../eslint-config/.eslintrc.ts.json ' .
'--max-warnings 0 ' .
'--fix ' .
$filePath
)
->run();
}
if (substr($filePath, -8) === '.spec.js') {
// fix ESLint using tests rules
return $this->collectionBuilder()
->taskExec(
'npx ../eslint-config/node_modules/.bin/eslint -c ../eslint-config/.eslintrc.tests_newsletter_editor.json ' .
'--max-warnings 0 ' .
'--fix ' .
$filePath
)
->run();
}
if (substr($filePath, -3) === '.js') {
// fix ESLint using ES5 rules
return $this->collectionBuilder()
->taskExec(
'npx ../eslint-config/node_modules/.bin/eslint -c ../eslint-config/.eslintrc.es5.json ' .
'--max-warnings 0 ' .
'--fix ' .
$filePath
)
->taskExec("pnpm eslint --max-warnings 0 --fix $filePath")
->run();
}
}
@ -580,6 +710,10 @@ class RoboFile extends \Robo\Tasks {
->run();
}
public function qaSemgrep() {
return $this->_exec('./tools/semgrep.sh lib/ lib-3rd-party/');
}
public function storybookBuild() {
return $this->_exec('pnpm run build-storybook');
}
@ -746,6 +880,9 @@ class RoboFile extends \Robo\Tasks {
->addCode(function () use ($version) {
$this->releaseCreatePullRequest($version);
})
->addCode(function () use ($version) {
$this->releaseRerunCircleWorkflow(\MailPoetTasks\Release\CircleCiController::PROJECT_PREMIUM);
})
->addCode(function () use ($version) {
$this->translationsPrepareLanguagePacks($version);
})
@ -882,9 +1019,23 @@ class RoboFile extends \Robo\Tasks {
->addCode(function () use ($version) {
return $this->releasePublishSlack($version);
})
->addCode(function () {
return $this->releaseMergePullRequest(\MailPoetTasks\Release\GitHubController::RELEASE_SOURCE_BRANCH);
})
->run();
}
public function releaseMergePullRequest(string $branch) {
try {
$this->createGitHubController()
->mergePullRequest(\MailPoetTasks\Release\CircleCiController::PROJECT_MAILPOET, $branch);
} catch (\Exception $e) {
$this->yell($e->getMessage(), 40, 'red');
exit(1);
}
$this->say("Pull request for branch: '{$branch}' was successfully merged");
}
/**
* This command displays how many pull request each person did recently
*/
@ -1063,6 +1214,18 @@ class RoboFile extends \Robo\Tasks {
$this->say("Release '$version[name]' info was published on Slack.");
}
public function releaseRerunCircleWorkflow(string $project = null) {
$circleciController = $this->createCircleCiController();
$result = $circleciController->rerunLatestWorkflow($project);
// Sometimes can be useful to know which Circle project workflow was restarted
$project = $project ? " for the project '{$project}'" : '';
if (!$result) {
$this->yell("Circle Workflow{$project} was not restarted", 40, 'red');
} else {
$this->say("Circle Workflow{$project} was started from the beginning");
}
}
public function downloadWooCommerceBlocksZip($tag = null) {
$this->createWpOrgDownloader('woo-gutenberg-products-block')
->downloadPluginZip('woo-gutenberg-products-block.zip', __DIR__ . '/tests/plugins/', $tag);
@ -1086,19 +1249,18 @@ class RoboFile extends \Robo\Tasks {
->downloadReleaseZip('woocommerce-subscriptions.zip', __DIR__ . '/tests/plugins/', $tag);
}
public function downloadWooCommerceZip($tag = null) {
if ($tag === 'woo-cot-beta') {
$this->downloadWooCommerceCotZip();
return;
public function downloadAutomateWooZip($tag = null) {
if (!getenv('WP_GITHUB_USERNAME') && !getenv('WP_GITHUB_TOKEN')) {
$this->yell("Skipping download of Automate Woo", 40, 'red');
exit(0); // Exit with 0 since it is a valid state for some environments
}
$this->createWpOrgDownloader('woocommerce')
->downloadPluginZip('woocommerce.zip', __DIR__ . '/tests/plugins/', $tag);
$this->createGithubClient('woocommerce/automatewoo')
->downloadReleaseZip('automatewoo.zip', __DIR__ . '/tests/plugins/', $tag);
}
public function downloadWooCommerceCotZip() {
$cotBuildUrl = 'https://github.com/woocommerce/woocommerce/files/9706609/woocommerce.zip';
file_put_contents(__DIR__ . '/tests/plugins/woocommerce.zip', file_get_contents($cotBuildUrl));
file_put_contents(__DIR__ . '/tests/plugins/woocommerce.zip-info', $cotBuildUrl);
public function downloadWooCommerceZip($tag = null) {
$this->createWpOrgDownloader('woocommerce')
->downloadPluginZip('woocommerce.zip', __DIR__ . '/tests/plugins/', $tag);
}
public function generateData($generatorName = null, $threads = 1) {
@ -1290,7 +1452,8 @@ class RoboFile extends \Robo\Tasks {
(isset($opts['xml']) && $opts['xml'] ? '--xml ' : '') .
(isset($opts['group']) && $opts['group'] ? '--group ' . $opts['group'] . ' ' : '') .
(isset($opts['skip-group']) && $opts['skip-group'] ? '--skip-group ' . $opts['skip-group'] . ' ' : '') .
'-f ' . (isset($opts['file']) && $opts['file'] ? $opts['file'] : '')
(isset($opts['stop-on-fail']) && $opts['stop-on-fail'] ? '-f ' : '') .
(isset($opts['file']) && $opts['file'] ? $opts['file'] : '')
)->dir(__DIR__ . '/tests/docker')->run();
}
}

BIN
mailpoet/assets/audio/0.mp3 Normal file

Binary file not shown.

BIN
mailpoet/assets/audio/1.mp3 Normal file

Binary file not shown.

BIN
mailpoet/assets/audio/2.mp3 Normal file

Binary file not shown.

BIN
mailpoet/assets/audio/3.mp3 Normal file

Binary file not shown.

BIN
mailpoet/assets/audio/4.mp3 Normal file

Binary file not shown.

BIN
mailpoet/assets/audio/5.mp3 Normal file

Binary file not shown.

BIN
mailpoet/assets/audio/6.mp3 Normal file

Binary file not shown.

BIN
mailpoet/assets/audio/7.mp3 Normal file

Binary file not shown.

BIN
mailpoet/assets/audio/8.mp3 Normal file

Binary file not shown.

BIN
mailpoet/assets/audio/9.mp3 Normal file

Binary file not shown.

BIN
mailpoet/assets/audio/a.mp3 Normal file

Binary file not shown.

BIN
mailpoet/assets/audio/b.mp3 Normal file

Binary file not shown.

BIN
mailpoet/assets/audio/c.mp3 Normal file

Binary file not shown.

BIN
mailpoet/assets/audio/d.mp3 Normal file

Binary file not shown.

BIN
mailpoet/assets/audio/e.mp3 Normal file

Binary file not shown.

BIN
mailpoet/assets/audio/f.mp3 Normal file

Binary file not shown.

BIN
mailpoet/assets/audio/g.mp3 Normal file

Binary file not shown.

BIN
mailpoet/assets/audio/h.mp3 Normal file

Binary file not shown.

BIN
mailpoet/assets/audio/i.mp3 Normal file

Binary file not shown.

BIN
mailpoet/assets/audio/j.mp3 Normal file

Binary file not shown.

BIN
mailpoet/assets/audio/k.mp3 Normal file

Binary file not shown.

BIN
mailpoet/assets/audio/l.mp3 Normal file

Binary file not shown.

BIN
mailpoet/assets/audio/m.mp3 Normal file

Binary file not shown.

BIN
mailpoet/assets/audio/n.mp3 Normal file

Binary file not shown.

BIN
mailpoet/assets/audio/o.mp3 Normal file

Binary file not shown.

BIN
mailpoet/assets/audio/p.mp3 Normal file

Binary file not shown.

BIN
mailpoet/assets/audio/q.mp3 Normal file

Binary file not shown.

BIN
mailpoet/assets/audio/r.mp3 Normal file

Binary file not shown.

BIN
mailpoet/assets/audio/s.mp3 Normal file

Binary file not shown.

BIN
mailpoet/assets/audio/t.mp3 Normal file

Binary file not shown.

BIN
mailpoet/assets/audio/u.mp3 Normal file

Binary file not shown.

BIN
mailpoet/assets/audio/v.mp3 Normal file

Binary file not shown.

BIN
mailpoet/assets/audio/w.mp3 Normal file

Binary file not shown.

BIN
mailpoet/assets/audio/x.mp3 Normal file

Binary file not shown.

BIN
mailpoet/assets/audio/y.mp3 Normal file

Binary file not shown.

BIN
mailpoet/assets/audio/z.mp3 Normal file

Binary file not shown.

View File

@ -1,4 +1,4 @@
.mailpoet-automation-workflow-add-trigger {
.mailpoet-automation-add-trigger {
align-items: center;
border: 1px dashed #c3c4c7;
border-radius: 4px;

View File

@ -0,0 +1,37 @@
.mailpoet-automation-editor-automation {
background: #fbfbfb;
flex-grow: 1;
}
.mailpoet-automation-editor-automation-wrapper {
display: grid;
padding: 50px 20px;
}
.mailpoet-automation-editor-automation-end {
background: #8c8f94;
border-radius: 999999px;
fill: white;
height: 18px;
margin: 4px auto;
padding: 3px;
width: 18px;
}
.mailpoet-automation-editor-stats {
margin: 0 auto 32px;
max-width: 480px;
width: 100%;
.mailpoet-automation-stats-item {
line-height: 22px;
}
.mailpoet-automation-stats-label {
color: #787c82;
}
.mailpoet-automation-stats-value {
font-size: 14px;
}
}

View File

@ -0,0 +1,44 @@
.mailpoet-automatoin-deactivate-modal {
color: #1d2327;
font-size: 13px;
line-height: 21px;
max-width: 480px;
.mailpoet-automation-options {
li {
margin-bottom: 12px;
}
}
.mailpoet-automation-option {
border: 2px solid #dcdcde;
border-radius: 4px;
color: #646970;
display: grid;
font-size: 12px;
grid-gap: 8px;
grid-template-columns: 20px auto;
line-height: 16px;
padding: 8px;
&.active {
border-color: #2271b1;
}
strong {
color: #1d2327;
display: block;
font-size: 13px;
font-weight: normal;
line-height: 21px;
}
}
.components-button {
float: right;
&.is-tertiary {
margin-right: 12px;
}
}
}

View File

@ -1,4 +1,4 @@
.mailpoet-automation-editor-empty-workflow {
.mailpoet-automation-editor-empty-automation {
align-items: center;
display: grid;
height: 100%;

View File

@ -30,3 +30,32 @@
outline: none;
}
}
.mailpoet-automation-field__error {
position: relative;
input:not([type='radio'])
select,
textarea,
input[type='text'].components-form-token-field__input {
background: right top/26px no-repeat url('../../img/icons/alert.svg');
padding-right: 26px;
}
select,
input[type=number] {
background-position-x: calc(100% - 26px);
padding-right: 8px !important;
}
.components-base-control__help,
.mailpoet-automation-field-message {
color: #d63638;
}
.components-button.mailpoet-automation-button-sidebar-primary,
.components-button.mailpoet-automation-button-sidebar-primary.has-text,
.components-button.mailpoet-automation-button-sidebar-primary.has-icon {
background: #d63638;
}
}

View File

@ -0,0 +1,35 @@
button.components-button.mailpoet-automation-filters-panel-add-filter {
padding-right: 12px;
&.has-icon > svg {
margin-right: 4px;
}
}
.mailpoet-automation-filters-list {
display: grid;
gap: 12px;
margin-bottom: 16px;
}
.mailpoet-automation-filters-list-item {
align-items: center;
background: #f0f0f0;
display: grid;
grid-template-columns: 1fr auto;
.mailpoet-automation-filters-list-item-content {
padding: 8px 12px;
}
.mailpoet-automation-filters-list-item-remove {
color: #757575;
margin: 4px;
padding: 0;
}
}
.mailpoet-automation-filters-list-item-field,
.mailpoet-automation-filters-list-item-value {
font-weight: 600;
}

View File

@ -2,9 +2,19 @@
padding-bottom: 100px;
}
.mailpoet-automation-panel-description {
color: #646970;
font-size: 13px;
margin-bottom: 16px;
}
.components-panel__body-title.mailpoet-automation-panel-plain-body-title {
display: grid;
grid-template-columns: 1fr auto;
&:hover {
background: none;
}
}
.mailpoet-automation-panel-plain-body-title-text {
@ -12,6 +22,10 @@
font-weight: 500;
line-height: normal;
padding: 16px 48px 16px 16px;
label & {
padding: 0;
}
}
.mailpoet-automation-panel-plain-body-title-action {
@ -57,3 +71,78 @@
color: #757575;
font-style: italic;
}
.mailpoet-automation-activate-panel {
animation: mailpoet-automation-activate-panel-animation .1s forwards;
background: #fff;
border-left: 1px solid #ddd;
bottom: 0;
height: 100%;
left: auto;
overflow: auto;
position: fixed;
right: 0;
top: 0;
transform: translateX(100%);
width: 281px;
z-index: 999999;
button {
justify-content: center;
width: 100%;
}
}
.mailpoet-automation-activate-panel__header {
align-content: space-between;
align-items: center;
display: flex;
height: 61px;
.has-icon {
margin-left: auto;
width: auto;
}
}
.mailpoet-automation-activate-panel__header,
.mailpoet-automation-activate-panel__section {
border-bottom: 1px solid #ddd;
}
.mailpoet-automation-activate-panel__header,
.mailpoet-automation-activate-panel__body {
padding-left: 16px;
padding-right: 16px;
.components-spinner {
display: block;
margin: 100px auto 0;
}
}
.mailpoet-automation-activate-panel__section {
margin-left: -16px;
margin-right: -16px;
padding: 16px;
}
.mailpoet-automation-activate-panel__header-activate-button,
.mailpoet-automation-activate-panel__header-cancel-button {
flex-grow: 1;
max-width: 160px;
}
.mailpoet-automation-activate-panel__header-activate-button {
padding-right: 4px;
}
.mailpoet-automation-activate-panel__header-cancel-button {
padding-left: 4px;
}
@keyframes mailpoet-automation-activate-panel-animation {
100% {
transform: translateX(0);
}
}

View File

@ -54,7 +54,10 @@
}
.mailpoet-automation-editor-step-title {
align-items: center;
color: $color-wordpress-grey-dark;
display: flex;
gap: 8px;
}
.mailpoet-automation-editor-step-subtitle {

View File

@ -1,19 +0,0 @@
.mailpoet-automation-editor-workflow {
background: #fbfbfb;
flex-grow: 1;
}
.mailpoet-automation-editor-workflow-wrapper {
display: grid;
padding: 50px 20px;
}
.mailpoet-automation-editor-workflow-end {
background: #8c8f94;
border-radius: 999999px;
fill: white;
height: 18px;
margin: 4px auto;
padding: 3px;
width: 18px;
}

View File

@ -1,3 +1,4 @@
@import './mailpoet/button';
@import './mailpoet/edit';
@import './mailpoet/thumbnail';
@import './mailpoet/steps';

View File

@ -0,0 +1 @@
@import './send-email';

View File

@ -0,0 +1,15 @@
.mailpoet-sendmail-description {
display: grid;
grid-gap: 4px;
grid-template-columns: 14px auto;
grid-template-rows: auto auto;
}
.mailpoet-sendemail-description-main {
grid-column-end: -1;
grid-column-start: 1;
}
.mailpoet-sendmail-description-type {
color: #787c82;
}

View File

@ -4,18 +4,64 @@
.mailpoet-add-new-button {
padding-right: 12px;
}
}
.mailpoet-automation-listing {
/* Prevent border radius beneath tabs */
border-radius: 0 0 1px 1px;
.mailpoet-automation-is-onboarding {
.notice {
display: none;
}
}
.mailpoet-automation-listing-heading {
margin-bottom: 16px;
}
.mailpoet-automation-listing {
box-shadow: none;
margin-bottom: 0;
}
.mailpoet-automation-listing-cell-name {
position: relative;
width: 100%;
> a:only-child {
bottom: 2px;
display: flex;
left: 0;
padding: 16px 24px;
position: absolute;
right: 0;
top: 0;
}
}
.mailpoet-filter-tab-panel {
background-color: #fff;
border-radius: 1px;
box-shadow: 0 0 0 1px rgba(0, 0, 0, .1);
outline: none;
border: 1px solid #dcdcde;
border-radius: 2px;
.components-tab-panel__tabs {
box-shadow: inset 0 -1px 0 0 #dcdcde;
}
.components-tab-panel__tabs-item:focus {
box-shadow: none;
}
.components-tab-panel__tabs-item.is-active {
box-shadow: inset 0 -4px 0 0 var(--wp-admin-theme-color);
}
.components-tab-panel__tabs-item:focus-visible {
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
}
.components-tab-panel__tabs-item.is-active:focus-visible {
box-shadow:
inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color),
inset 0 -4px 0 0 var(--wp-admin-theme-color);
}
.count {
background-color: #f0f0f1;
@ -27,6 +73,13 @@
}
}
.mailpoet-automation-listing-heading {
margin-bottom: 16px;
.mailpoet-automation-listing-more-button button.components-button {
height: 36px;
padding: 0;
width: 36px;
svg {
height: 28px;
width: 28px;
}
}

View File

@ -0,0 +1,201 @@
@mixin full-width {
margin-left: -20px;
padding-left: 104px;
padding-right: 104px;
width: calc(100% + 60px);
@media screen and (max-width: 782px) {
margin-left: -10px;
width: calc(100% + 34px);
}
}
.mailpoet-automation-section {
@include full-width;
}
.mailpoet-automation-white-background {
background: #fff;
}
.mailpoet-automation-section-content {
display: block;
margin: auto;
max-width: 1072px;
padding: 65px 0;
h2 {
font-size: 23px;
font-weight: 400;
line-height: 32px;
margin: 0;
padding: 0 0 8px;
}
p {
font-size: 14px;
font-weight: 400;
line-height: 22px;
margin: 0;
padding: 0 0 40px;
}
}
.mailpoet-automation-section-hero {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin-top: -20px;
h1 {
font-size: 32px;
font-weight: 400;
line-height: 40px;
}
p {
font-size: 14px;
line-height: 22px;
margin-bottom: 32px;
}
> div {
width: 400px;
}
img {
margin-top: 16px;
max-width: 100%;
width: 532px;
@media screen and (min-width: 1305px) {
height: 100%;
margin-top: 0;
max-height: 294px;
width: auto;
}
}
}
.mailpoet-automation-preheading {
display: block;
font-size: 11px;
letter-spacing: .2px;
line-height: 16px;
margin-bottom: 32px;
text-transform: uppercase;
}
.mailpoet-section-templates {
padding: 48px 0;
.components-button {
display: block;
font-size: 16px;
font-weight: 400;
line-height: 25px;
text-align: center;
text-underline-offset: 5px;
}
}
.mailpoet-section-template-list {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin-bottom: 40px;
> li {
flex-grow: 1;
margin-right: 8px;
max-width: 336px;
&:last-child {
margin-right: 0;
}
button {
background: #fff;
border: 1px solid #dcdcde;
border-radius: 0;
color: #1d2327;
cursor: pointer;
padding: 24px;
text-align: left;
h3 {
font-size: 16px;
font-weight: 600;
line-height: 24px;
}
}
}
}
.mailpoet-section-build-list-button {
background: transparent;
border: 0;
color: #000;
cursor: pointer;
font-size: 16px;
font-weight: 400;
line-height: 24px;
padding: 0;
text-align: left;
width: 100%;
}
.mailpoet-section-build-your-own {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
ol {
list-style: decimal-leading-zero inside;
margin: 0;
max-width: 373px;
padding: 0;
> li {
border-bottom: 1px solid #dcdcde;
display: grid;
grid-gap: 16px;
grid-template-columns: 16px auto;
margin-bottom: 16px;
padding-bottom: 16px;
&.open {
p {
display: block;
}
.mailpoet-section-build-list-button {
font-weight: 600;
}
}
&:last-of-type {
border: 0;
}
}
.marker {
color: #ff5301;
display: inline-block;
font-size: 16px;
font-weight: 600;
line-height: 24px;
}
p {
display: none;
padding: 0;
}
}
img {
height: auto;
max-width: 400px;
width: 100%;
}
}

View File

@ -0,0 +1,7 @@
.mailpoet-automation-listing-cell-actions {
align-items: center;
display: grid;
gap: 8px;
grid-auto-flow: column;
white-space: nowrap;
}

View File

@ -1,6 +1,8 @@
.mailpoet-automation-listing-cell-status {
align-items: center;
display: flex;
display: grid;
grid-auto-flow: column;
white-space: nowrap;
> div.components-base-control > div.components-base-control__field {
margin-bottom: 0;

View File

@ -0,0 +1,33 @@
.mailpoet-option-button {
display: flex;
margin-top: 8px;
position: relative;
}
.mailpoet-option-button-main {
border-radius: 2px 0 0 2px;
margin-right: 1px;
}
.mailpoet-option-button-opener {
background: var(--wp-admin-theme-color);
border-radius: 0 2px 2px 0;
color: white;
}
.mailpoet-option-button-opener svg {
fill: white;
}
.mailpoet-option-button-opener .is-opened svg {
transform: scale(-1, -1);
transform-origin: center 12.5px;
}
.mailpoet-option-button-opener.is-busy {
animation: components-button__busy-animation 2500ms infinite linear;
background-color: var(--wp-admin-theme-color);
background-image: linear-gradient(-45deg, var(--wp-admin-theme-color) 33%, var(--wp-admin-theme-color-darker-20) 33%, var(--wp-admin-theme-color-darker-20) 70%, var(--wp-admin-theme-color) 70%);
background-size: 100px 100%;
border-color: var(--wp-admin-theme-color);
}

View File

@ -0,0 +1,32 @@
.mailpoet-automation-stats {
display: grid;
grid-auto-flow: column;
justify-content: space-between;
}
.mailpoet-automation-stats-item {
color: $color-wordpress-heading;
display: grid;
font-size: 12px;
line-height: 16px;
text-align: center;
}
.mailpoet-automation-stats-label {
color: #646970;
display: block;
&.display-after {
order: 1;
}
}
.mailpoet-automation-stats-value {
font-weight: 600;
}
.mailpoet-automation-stats-item-separator {
color: #a7aaad;
font-size: 20px;
margin: 0 16px;
}

View File

@ -145,11 +145,11 @@
/* Sidepanel overrides */
.mailpoet_panel_body {
margin: 19px;
margin: 0;
padding: 0;
.mailpoet_editor_settings h3 {
margin-top: 0;
margin: 19px;
}
}

View File

@ -1,7 +1,6 @@
.admin_page_mailpoet-newsletter-editor {
.mailpoet_form_field {
margin-bottom: 15px;
margin-top: 15px;
margin: 19px 15px;
}
.mailpoet_form_field_title {
@ -51,4 +50,8 @@
.mailpoet_form_field_block {
display: block;
}
.mailpoet_form_field_input_nowrap {
white-space: nowrap;
}
}

View File

@ -12,6 +12,12 @@
font-size: 1.4em;
text-transform: uppercase;
}
.components-panel__row {
align-items: flex-start;
flex-direction: column;
justify-content: flex-start;
}
}
.mailpoet_sidepanel_field {

View File

@ -0,0 +1,90 @@
.mailpoet_coupon_block {
.mailpoet_editor_coupon {
text-align: center;
}
.mailpoet_editor_coupon_overlay {
background: rgba(255, 255, 255, .5);
color: #000;
cursor: pointer;
display: none;
font-size: 18px;
height: 100%;
position: absolute;
text-align: center;
top: 0;
width: 100%;
}
:hover {
.mailpoet_editor_coupon {
opacity: .5;
}
.mailpoet_editor_coupon_overlay {
display: block;
}
}
}
.coupon_amount_wrapper {
position: relative;
}
.amount_percentage_sign {
font-size: 18px;
font-weight: bold;
left: 150px; // .mailpoet_input_medium width
line-height: 30px;
margin-left: 10px;
position: absolute;
}
.mailpoet_coupon_block_coupon {
background: $color-white;
font-size: 13px;
height: auto;
line-height: 21px;
margin-bottom: 16px;
padding: 16px 0;
width: 100%;
input[type='radio'] {
margin-left: 16px;
}
div {
padding: 0 16px 0 40px;
&.discount_type {
font-style: italic;
}
}
}
.mailpoet_coupon_block_settings,
.mailpoet_coupon_block_display_options {
@include animation-slide-open-downwards();
overflow-x: hidden;
}
.mailpoet_editor_settings {
.components-panel__header.edit-post-sidebar__panel-tabs {
background: $color-primary-background;
border-bottom: none;
}
.components-base-control {
width: 100%;
}
.components-panel {
background: $color-primary-background;
border-left: none;
border-right: none;
}
.components-search-control input[type=search].components-search-control__input {
background: $color-white;
}
}

View File

@ -24,6 +24,7 @@
.mailpoet_settings_posts_selection {
@include animation-slide-open-downwards();
overflow-x: hidden;
padding: 0 19px;
}
.mailpoet_settings_posts_show_display_options,

View File

@ -24,6 +24,7 @@
.mailpoet_settings_products_selection {
@include animation-slide-open-downwards();
overflow-x: hidden;
padding: 0 19px;
}
.mailpoet_settings_products_show_display_options,

View File

@ -22,8 +22,23 @@
// We don't use any default block (WP Post editor has paragraph)
// and CSS distributed within packages is works only with the paragraph block
// We want to display it in center
.block-editor .block-editor-inserter {
width: 100%;
}
.block-editor .block-editor-inserter .block-editor-button-block-appender.block-list-appender__toggle {
align-items: center;
box-shadow: inset 0 0 0 1px #1e1e1e;
display: flex;
height: auto;
justify-content: center;
margin: 0 auto;
padding: 12px;
width: 100%;
&:hover {
box-shadow: inset 0 0 0 1px var(--wp-admin-theme-color)
}
}
// Html blocks contains iframe which captures clicks and in some cases prevents selecting block.
@ -86,16 +101,19 @@ h2 {
// Adjustments for family-font-select in popover
.mailpoet_toolbar_item {
.mailpoet-font-family-select {
height: 48px;
.components-input-control__container .components-custom-select-control__button {
height: 48px;
width: 200px;
}
}
// Force rendering of select arrow on the right
.components-custom-select-control__button svg {
margin-right: initial;
// Backdrop is displayed over the select button so we need to disable pointer events so that we can click the select
.components-input-control__backdrop {
pointer-events: none !important;
}
.components-input-control__suffix * {
pointer-events: none !important;
}
}
}
@ -111,10 +129,29 @@ h2 {
.edit-post-visual-editor {
background-color: $color-white;
padding: 10px;
padding: 10px 10px 100px;
}
// Unify padding o wp-block-columns with background with front end rendering
.wp-block-columns.has-background {
padding: 10px;
}
// Close button animation
.edit-post-header-toolbar.edit-post-header-toolbar__left > .edit-post-header-toolbar__inserter-toggle {
svg {
transition: transform cubic-bezier(.165, .84, .44, 1) .2s;
}
&.is-pressed svg {
transform: rotate(45deg);
}
}
// Hide block selector header with close button on desktops
@include respond-to(not-small-screen) {
.edit-post-editor__inserter-panel-header {
display: none;
}
}

View File

@ -1,28 +0,0 @@
// Override CSS for HelpScout beacon on form editor page
.admin_page_mailpoet-form-editor {
.BeaconFabButtonFrame,
.BeaconContainer {
left: 175px;
}
&.folded {
.BeaconFabButtonFrame,
.BeaconContainer {
left: 50px;
}
}
@include respond-to(medium-screen) {
.BeaconFabButtonFrame,
.BeaconContainer {
left: 50px;
}
}
@include respond-to(small-screen) {
.BeaconFabButtonFrame,
.BeaconContainer {
left: 15px;
}
}
}

View File

@ -3,19 +3,17 @@
grid-auto-flow: row;
grid-row-gap: 20px;
.components-base-control {
margin-bottom: 0;
}
.components-radio-control {
.components-flex {
flex-direction: row;
justify-content: flex-start;
}
.components-base-control__label {
display: block;
font-weight: bold;
}
.components-radio-control__option {
display: inline-block;
margin-right: 1em;
width: auto;
.components-radio-control__option {
display: inline-block;
margin-right: 1em;
width: auto;
}
}
.mailpoet-size-settings-control .components-range-control__number {
@ -43,10 +41,6 @@
.components-input-control__container {
width: 100%;
}
.components-custom-select-control__label {
font-weight: bold;
}
}
}
@ -101,25 +95,6 @@
}
.mailpoet-color-gradient-picker {
.block-editor-color-gradient-control__color-indicator {
font-weight: bold;
}
.component-color-indicator {
vertical-align: text-bottom;
}
}
// Styles for labels and headings for style setting components
// We override some styles from @wordpress/components to have unified labels appearance
.mailpoet-styles-settings .components-base-control__label,
.mailpoet-styles-settings .components-input-control__label,
.mailpoet-styles-settings .components-custom-select-control__label,
.mailpoet-styles-settings .components-font-size-picker label {
font-size: 13px;
font-weight: normal;
margin-bottom: .5em;
.component-color-indicator {
vertical-align: text-bottom;
}

View File

@ -30,8 +30,13 @@
}
}
.components-base-control.mailpoet-form-success-types__control {
margin-bottom: 0;
.components-base-control.mailpoet-form-inline-radios__control {
.components-flex {
flex-direction: row;
gap: $grid-gap-half;
justify-content: flex-start;
margin-bottom: $grid-gap-half;
}
.components-base-control__label {
display: block;
@ -39,7 +44,6 @@
.components-radio-control__option {
display: inline-block;
margin-right: 1em;
input {
margin-right: 6px;
@ -123,4 +127,5 @@
// This style hides the horizontal scrollbar in Firefox browser
.interface-interface-skeleton__sidebar {
overflow-x: hidden;
padding-bottom: 100px;
}

View File

@ -0,0 +1,37 @@
.mailpoet-homepage-section__container {
background-color: $color-white;
box-shadow: rgb(0 0 0 / 10%) 0 0 0 1px;
margin: $grid-gap-xl 0 $grid-gap-medium;
}
.mailpoet-homepage-section__heading {
align-items: center;
border-bottom: 1px solid $color-homepage-borders;
display: grid;
grid-template-columns: auto 100px;
padding: $grid-gap $grid-gap-medium;
position: relative;
h2 {
font-size: 20px;
font-weight: normal;
line-height: 28px;
margin: 0;
span {
color: $color-text-light;
display: block;
font-size: 14px;
line-height: 1.5;
}
}
.mailpoet-homepage-section__heading-after {
display: grid;
justify-items: end;
}
@include respond-to(small-screen) {
padding: $grid-gap-half $grid-gap-medium;
}
}

View File

@ -0,0 +1,5 @@
.mailpoet-homepage__container {
margin: 0 auto;
margin-top: $grid-gap-xl;
max-width: 680px;
}

View File

@ -0,0 +1,68 @@
.mailpoet-homepage-product-discovery {
ul {
margin: 0;
}
}
.mailpoet-product-discovery__task {
align-items: center;
border-bottom: 1px solid $color-homepage-borders;
box-sizing: border-box;
cursor: pointer;
display: grid;
font-weight: 600;
grid-template-columns: (124px + $grid-gap-medium) auto $grid-gap-xl;
margin: 0;
padding: $grid-gap-medium;
position: relative;
width: 100%;
@include respond-to(small-screen) {
grid-template-columns: auto $grid-gap-xl;
img {
display: none;
}
}
&:last-child {
border-bottom: none;
}
&:hover {
box-shadow: inset 5px 0 0 0 var(--wp-admin-theme-color);
}
}
.mailpoet-product-discovery__task--completed {
cursor: inherit;
&:hover {
box-shadow: none;
}
}
.mailpoet-product-discovery__task-content {
h3 {
color: var(--wp-admin-theme-color);
font-size: 14px;
line-height: 20px;
margin: 0;
}
p {
color: $color-text-light;
font-weight: normal;
margin: 3px 0 0;
}
}
.mailpoet-product-discovery__task-after {
.mailpoet-task-list__task-icon {
background-color: var(--wp-admin-theme-color);
svg {
fill: $color-white;
}
}
}

View File

@ -0,0 +1,55 @@
.mailpoet-homepage-resources__posts {
display: grid;
grid-template-columns: 1fr 1fr;
@include respond-to(small-screen) {
display: block;
}
}
.mailpoet-resource-post {
@include animation-fade-in();
display: block;
padding: $grid-gap-medium;
text-decoration: none;
h3 {
font-size: 14px;
}
p {
color: $color-text-light;
font-size: 13px;
margin-bottom: 0;
}
img {
border-radius: 4px;
}
}
.mailpoet-homepage-resources__pagination {
border-top: 1px solid $color-homepage-borders;
color: $color-text-light;
display: flex;
font-size: 13px;
padding: $grid-gap-medium;
a {
height: 20px;
margin-left: $grid-gap;
svg {
margin: 0;
opacity: 1;
}
}
svg {
fill: $color-text-light;
height: 20px;
margin-left: $grid-gap;
opacity: .4;
width: 20px;
}
}

View File

@ -0,0 +1,117 @@
.mailpoet-subscribers-stats {
.mailpoet-homepage-section__heading-after span {
color: darken($color-stats-excellent, 10%);
display: grid;
font-size: 20px;
grid-template-columns: 1fr 1fr;
justify-items: end;
line-height: 28px;
svg {
fill: darken($color-stats-excellent, 10%);
height: 28px;
width: 28px;
}
&.mailpoet-decrease {
color: darken($color-stats-critical, 10%);
svg {
fill: darken($color-stats-critical, 10%);
transform: scale(1, -1);
}
}
}
}
.mailpoet-subscribers-stats-global-change {
display: grid;
grid-template-columns: 1fr 1fr;
width: 100%;
div {
color: $color-text-light;
padding: $grid-gap-medium;
text-transform: uppercase;
&:first-child {
border-right: 1px solid $color-homepage-borders;
}
span {
color: $color-homepage-dark-grey;
font-size: 20px;
line-height: 1.4;
}
}
}
.mailpoet-subscribers-stats-list-change-table {
border-collapse: collapse;
width: 100%;
thead {
background: $color-homepage-light-grey;
text-transform: capitalize;
}
a {
font-weight: 600;
text-decoration: none;
}
td,
th {
border: none;
border-top: 1px solid $color-homepage-borders;
color: $color-homepage-dark-grey;
padding: $grid-gap $grid-gap-medium;
text-align: left;
@include respond-to(small-screen) {
padding: $grid-gap $grid-gap-half;
&:first-child {
padding-left: $grid-gap-medium;
}
&:last-child {
padding-right: $grid-gap-medium;
}
}
}
@include respond-to(small-screen) {
td:nth-child(2),
th:nth-child(2) {
display: none;
}
}
}
.mailpoet-subscribers-stats-empty {
align-items: center;
color: $color-text-light;
display: flex;
flex-direction: column;
font-size: 13px;
justify-content: center;
padding: $grid-gap-large;
svg {
background: $color-homepage-light-grey;
border-radius: 50%;
fill: $color-secondary;
height: 32px;
width: 32px;
}
a {
text-decoration: none;
}
p {
max-width: 340px;
text-align: center;
}
}

View File

@ -0,0 +1,126 @@
$task-icon-size: 32px;
.mailpoet-task-list__task {
background-color: $color-white;
border-bottom: 1px solid $color-homepage-borders;
box-sizing: border-box;
cursor: pointer;
display: grid;
font-weight: 600;
grid-template-columns: $grid-gap-xl auto $grid-gap-xl;
margin: 0;
padding: $grid-gap $grid-gap-medium;
position: relative;
width: 100%;
&:hover {
background-color: $color-grey-0;
}
}
.mailpoet-task-list__task-content {
align-content: center;
color: var(--wp-admin-theme-color);
display: flex;
flex-direction: column;
font-size: 14px;
justify-content: center;
line-height: 20px;
p {
color: $color-text-light;
font-weight: normal;
margin: 3px 0 0;
}
a {
color: var(--wp-admin-theme-color);
&:hover {
color: var(--wp-admin-theme-color-darker-20);
}
}
}
.mailpoet-task-list__task-before {
color: var(--wp-admin-theme-color);
display: flex;
flex-direction: column;
justify-content: center;
}
.mailpoet-task-list__task-icon {
border: 1px solid var(--wp-admin-theme-color);
border-radius: 50%;
box-sizing: border-box;
height: $task-icon-size;
line-height: $task-icon-size;
text-align: center;
width: $task-icon-size;
svg {
fill: var(--wp-admin-theme-color);
margin: 3px;
}
}
.mailpoet-task-list__task--completed {
cursor: inherit;
&:hover {
background-color: $color-white;
}
.mailpoet-task-list__task-icon {
background-color: var(--wp-admin-theme-color);
svg {
fill: $color-white;
}
}
}
.mailpoet-task-list__task--active {
box-shadow: inset 5px 0 0 0 var(--wp-admin-theme-color);
&:after {
background-color: var(--wp-admin-theme-color);
content: '';
height: 100%;
left: 0;
opacity: .1;
pointer-events: none;
position: absolute;
top: 0;
width: 100%;
}
}
.mailpoet-task-list__heading p,
.mailpoet-task-list__all-set {
color: $color-text-light;
font-size: $heading-font-size-h4;
line-height: 1.5;
margin-top: $grid-gap-large;
text-align: center;
}
.mailpoet-task-list__heading {
margin-bottom: $grid-gap-large;
position: relative;
h1 {
margin: 0;
}
p {
margin-top: $grid-gap-half;
text-align: left;
}
.components-dropdown {
position: absolute;
right: 0;
top: 6px;
}
}

View File

@ -0,0 +1,64 @@
.mailpoet-homepage-upsell {
background: bottom right/290px no-repeat url('../../img/homepage/upsell-illustration.png') #fffaf2;
min-height: 288px;
.mailpoet-homepage-section__heading {
border: none;
height: auto;
padding: 0;
h2 {
background-color: $color-white;
max-width: 330px;
padding: 32px 20px 0 40px;
}
}
.mailpoet-homepage-section__heading-after {
bottom: 20px;
position: relative;
right: 20px;
}
.mailpoet-homepage-upsell__content {
background-color: $color-white;
max-width: 330px;
padding: 8px 20px 32px 40px;
ul {
margin: 0;
padding: 0 0 8px;
li {
line-height: 16px;
margin: 4px 0;
svg {
fill: $color-secondary-middle;
vertical-align: middle;
}
span {
line-height: 18px;
padding-left: 12px;
}
}
}
}
}
@include respond-to(small-screen) {
.mailpoet-homepage-upsell {
background: $color-white;
.mailpoet-homepage-section__heading {
h2 {
max-width: 270px;
}
}
.mailpoet-homepage-upsell__content {
max-width: 270px;
}
}
}

View File

@ -56,6 +56,7 @@ p.sender_email_address_warning:first-child {
// Fix for select 2 placeholder padding rendering issue in Chrome
.select2-container .select2-search--inline,
.select2-container .select2-search--inline .select2-search__field {
height: 22px;
max-width: 100%;
}
@ -122,3 +123,21 @@ body .components-modal__screen-overlay {
justify-content: flex-end;
margin-top: $grid-gap-half;
}
.mailpoet-locked-badge {
align-items: center;
background: #fcf9e8;
border: .5px solid #f5e6ab;
border-radius: 4px;
color: #bd8600;
display: flex;
font-size: 11px;
font-weight: 500;
gap: 4px;
height: 20px;
letter-spacing: .2px;
line-height: 16px;
padding: 2px 8px 2px 4px;
text-transform: uppercase;
width: 82px;
}

View File

@ -27,10 +27,6 @@ input.select2-search__field:-ms-input-placeholder {
color: $color-placeholder-select2;
}
.select2-container--default.select2-container--focus .select2-selection--multiple {
border: 1px solid #aaa; /* default Select2 border for single dropdown */
}
textarea.regular-text {
width: 25em !important;
}
@ -232,3 +228,7 @@ progress::-moz-progress-bar {
.mailpoet-form-field-tags label.components-form-token-field__label {
display: none;
}
.mailpoet-form-field-disabled {
cursor: not-allowed;
}

View File

@ -0,0 +1,202 @@
#mailpoet_landingpage_container {
$content-padding: 32px 65px;
$mobile-content-padding: 25px;
$landingpage-max-width: 1460px;
.mailpoet-content-center {
text-align: center;
}
.mailpoet-content-padding {
padding: $content-padding;
@include respond-to(small-screen) {
padding: $mobile-content-padding
}
}
.landing-header {
padding: $content-padding;
@include respond-to(small-screen) {
padding: $mobile-content-padding
}
}
.landing-footer {
background-color: $color-landingpage-background-light;
padding: $content-padding;
.landing-footer-content {
box-shadow: 0 -1px 0 0 $color-tertiary-light;
padding: 25px 0;
}
}
.landing-faq {
background-color: $color-landingpage-background-light;
padding: $content-padding;
.mailpoet-faq-accordion {
margin: 25px 0;
}
.landing-faq-mobile {
display: none;
}
@include respond-to(small-screen) {
padding: $mobile-content-padding;
.landing-faq-header {
display: none;
}
.landing-faq-mobile {
display: block;
}
}
}
.landing-content {
.hero-section {
$hero-image-offset: 6rem;
background-color: $color-landingpage-background-light;
margin-top: $hero-image-offset;
padding: $content-padding;
.hero-image {
margin-top: -($hero-image-offset + 2rem);
}
@include respond-to(small-screen) {
padding: $mobile-content-padding
}
}
.landingpage-images {
@include respond-to(medium-screen) {
width: 100%;
}
}
.landingpage-general-features {
p:last-child {
margin: 10px auto;
width: 60%;
}
.landingpage-feature-icon {
display: block;
margin: 0 auto;
padding: 20px;
text-align: center;
}
@include respond-to(medium-screen) {
p:last-child {
width: 100%;
}
}
}
.landingpage-wooCommerce-features {
margin-top: 30px;
padding: 2rem 10rem;
.landingpage-wooCommerce-feature-item {
padding: 30px;
@media screen and (min-width: 960px) and (max-width: 1460px) {
.landingpage-images {
width: 100%;
}
}
div:last-child {
margin: auto;
}
}
@include respond-to(small-screen) {
padding: $mobile-content-padding;
.landingpage-wooCommerce-feature-item {
padding: 25px 0;
div:last-child {
text-align: center;
}
}
}
}
}
main {
margin: 0 auto;
max-width: $landingpage-max-width;
}
}
.mailpoet-faq-accordion {
details {
overflow: hidden;
&:not(:first-child) {
border-top: 1px solid $color-editor-border-structure;
}
summary {
cursor: pointer;
padding: 20px 5px;
position: relative;
&::-webkit-details-marker { // remove default marker
content: '';
display: none;
}
&::marker { // remove default marker
content: '';
display: none;
}
&:after {
content: '';
font-size: 30px;
position: absolute;
right: 20px;
top: 0;
transform: rotate(90deg);
transform-origin: center;
transition: .2s transform ease;
}
@include respond-to(small-screen) {
&:after {
right: -1px;
}
}
}
.content {
max-height: 0;
overflow: hidden;
padding: 10px 5px;
transition: max-height .3s ease;
}
// when accordion is opened
&[open] {
summary:after {
transform: rotate(-90deg);
transition: .5s transform ease;
}
.content {
max-height: 400px;
transition: max-height .5s ease-in;
}
}
}
}

View File

@ -202,6 +202,19 @@ h1.title.mailpoet-newsletter-listing-heading {
}
}
.mailpoet-listing-status-corrupt {
flex-direction: column;
padding-left: 0;
.mailpoet-listing-status-label {
padding-left: 0;
}
.mailpoet-listing-status-message {
color: $color-destructive;
}
}
.mailpoet-listing-status-percentage {
stroke-width: 2px;
}

View File

@ -4,6 +4,6 @@
}
// Fix for 3rd party plugins icons in menu that might display broken because we block loading 3rd party CSS on mailepoet pages
#adminmenu .wp-menu-image img {
#adminmenu :not(.toplevel_page_site-card) .wp-menu-image img {
max-width: 20px;
}

Some files were not shown because too many files have changed in this diff Show More