Commit Graph

21439 Commits

Author SHA1 Message Date
Rostislav Wolny
ddf323aa3b Release 4.12.2 2023-04-21 13:01:54 +02:00
Brezo Cordero
2b83c8c69f Fix previously sanitized link
[MAILPOET-5254]
2023-04-21 11:14:25 +02:00
Rostislav Wolny
f6b752e807 Revert email links sanitization on save
[MAILPOET-5254]
2023-04-21 11:14:25 +02:00
Jan Jakes
d00efbeb54 Fix filter handler may change query builder as a side effect
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
Jan Jakes
51c22c7044 Add integration test for trigger filters
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
Jan Jakes
963dd083b6 Add subscriber segments field, comment out other fields for now
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
Jan Jakes
f6a59647d5 Implement filter args validation
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
Jan Jakes
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
Jan Jakes
ffaa140289 Implement finding all static and dynamic segments for a subscriber
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
Jan Jakes
0157feb508 Remove no longer used exception
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
Jan Jakes
abe44ca9f8 Implement filter handler to apply filters on field values during automation run
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
Jan Jakes
9d99872ef7 Implement field value loading logic
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
Jan Jakes
7d6cfd911e Pass subject payload to field factories
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
Jan Jakes
7f9faf1d99 Use automation WP helpers
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
Jan Jakes
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
Jan Jakes
54f5addca9 Extract subject loading before automation processing loop
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
Jan Jakes
70dbfc28b7 Early return when no active automation matches given trigger
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
Jan Jakes
d99a7bca90 Render filter conditions
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
Jan Jakes
9f856b5b01 Add filter value rendering
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
Jan Jakes
925e8722e7 Add filter delete placeholder
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
Jan Jakes
8a3a068e6a Add rendering of the list of existing filters
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
Jan Jakes
447b0e496c Add filters to UI registry
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
Jan Jakes
4ff9306826 Add filter management into automation registry
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
Jan Jakes
56b551dc16 Implement enum array filter
[MAILPOET-4946]
[MAILPOET-5002]
2023-04-20 16:32:32 +02:00
Jan Jakes
370f3082de Implement string filter
[MAILPOET-4946]
[MAILPOET-4419]
2023-04-20 16:32:32 +02:00
Jan Jakes
52be5ca3f9 Add interface for filter definition
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
Jan Jakes
eaa1a4aa69 Save automation filters to the database
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
Jan Jakes
014db1e695 Add step filters schema
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
Jan Jakes
3ed038479a Add subject data to automation editor registry
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
Jan Jakes
0bf9e75dd0 Automatically register fields exposed from subjects
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
Jan Jakes
209ede594e Add fields management to automation registry
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
Jan Jakes
97e40955ab Add fields to subject interface
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
Jan Jakes
3da51a0cf9 Add filters section with premium upsell to triggers
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
Jan Jakes
3af9701683 Expose FormTokenField from @wordpress/components
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
Jan Jakes
ad319393b7 Expose Button from @wordpress/components
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
Jan Jakes
28c4f5e3d0 Fix missing key prop
[MAILPOET-4946]
2023-04-20 16:32:32 +02:00
Jan Jakes
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
Rodrigo Primo
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
Rodrigo Primo
a3cf1daeae Remove code coverage code as it is not used anymore
[MAILPOET-2440]
2023-04-20 16:21:34 +02:00
Pavel Dohnal
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
Pavel Dohnal
08c320423b Use a discouraged function in the tests directly
[MAILPOET-5245]
2023-04-20 12:00:29 +02:00
Brezo Cordero
8b7b933d1e Release 4.12.1 2023-04-19 12:42:28 -05:00
Oluwaseun Olorunsola
ec987cbc4e Fix errors in 3rd party lib
MAILPOET-5239
2023-04-19 14:47:38 +01:00
Jan Lysý
0fe75d98f9 Add migration fixing newsletter option fields
[MAILPOET-5244]
2023-04-19 15:32:28 +02:00
Jan Lysý
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
Jan Lysý
f5a2088000 Add test cases for minute scheduling
[MAILPOET-5244]
2023-04-19 15:32:28 +02:00
Brezo Cordero
b35b772eb1 Release 4.12.0 2023-04-18 13:01:06 -05:00
Rodrigo Primo
769a11048e Remove PHPStan ignored error as it is not happening anymore
[MAILPOET-5232]
2023-04-17 14:33:51 -03:00
Rodrigo Primo
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
Rodrigo Primo
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