Compare commits

...

534 Commits

Author SHA1 Message Date
0302df7fcf Merge tag '5.13.2' 2025-08-22 15:42:52 -05:00
 Ján Mikláš
efd504f695 Release 5.13.2 2025-08-20 21:43:19 +02:00
Eason Su
0b1b54bed3 Release 5.13.0 2025-08-12 18:53:59 +08:00
Eason Su
f94edc0cbc Add a parameter to ChangelogController for specifying the changelog directory of Changelogger. 2025-08-12 11:36:58 +02:00
Eason Su
160c703267 Remove unnecessary ending periods from the changelog files. 2025-08-12 11:36:58 +02:00
 Ján Mikláš
ec5567e2d0 Add changelog
STOMAIL-7355
2025-08-11 14:06:31 +02:00
 Ján Mikláš
4533544274 Fix typo
STOMAIL-7355
2025-08-11 14:06:31 +02:00
 Ján Mikláš
43aa021a55 Update tests
STOMAIL-7355
2025-08-11 14:06:31 +02:00
 Ján Mikláš
2c8139856d Only show Subscriptions automation templates when WCS is active
STOMAIL-7355
2025-08-11 14:06:31 +02:00
 Ján Mikláš
dc51d94d50 Add "Win back churned subscribers" automation template holder
STOMAIL-7355
2025-08-11 14:06:31 +02:00
 Ján Mikláš
62e953abf0 Add "Win-back churned subscribers" automation template holder
STOMAIL-7355
2025-08-11 14:06:31 +02:00
 Ján Mikláš
c484dfa109 Add "Follow up when trial ends" automation template holder
STOMAIL-7355
2025-08-11 14:06:31 +02:00
 Ján Mikláš
be34bed195 Add "Follow up on churned subscription" automation template holder
STOMAIL-7355
2025-08-11 14:06:31 +02:00
 Ján Mikláš
528dec12d8 Add "Follow up after failed renewal" automation template holder
STOMAIL-7355
2025-08-11 14:06:31 +02:00
 Ján Mikláš
7af8ad66ce Add "Follow up after a subscription renewal" automation template holder
STOMAIL-7355
2025-08-11 14:06:31 +02:00
 Ján Mikláš
2f4518ac94 Add "Follow up after a subscription purchase" automation template holder
STOMAIL-7355
2025-08-11 14:06:31 +02:00
 Ján Mikláš
a0559a30bf Add tests
STOMAIL-7355
2025-08-11 14:06:31 +02:00
 Ján Mikláš
c7e0bdf81a Add "Active subscriptions count" field to customer in automations
STOMAIL-7355
2025-08-11 14:06:31 +02:00
 Ján Mikláš
c44e17ba81 Add new Subscriptions automation template category
STOMAIL-7355
2025-08-11 14:06:31 +02:00
 Ján Mikláš
3dc00f86b8 Add context to automation category titles
I specifically didn't add translators comment, as some of these strings might be translated differently than when used in other places

STOMAIL-7355
2025-08-11 14:06:31 +02:00
 Ján Mikláš
05bdce7175 Change WooCommerce to Post-purchase automation category
This is to better reflect what the category contains, as there are more categories that are related to WooCommerce

STOMAIL-7355
2025-08-11 14:06:31 +02:00
 Ján Mikláš
c3a37c5fec Update tests
STOMAIL-7352
2025-08-11 13:27:03 +02:00
 Ján Mikláš
59b56164b8 Add "Follow up on a negative review" automation template holder
STOMAIL-7352
2025-08-11 13:27:03 +02:00
 Ján Mikláš
d39e7b3d33 Add "Follow up on a positive review" automation template holder
STOMAIL-7352
2025-08-11 13:27:03 +02:00
 Ján Mikláš
343984bb9e Add "Ask for review" automation template holder
STOMAIL-7352
2025-08-11 13:27:03 +02:00
 Ján Mikláš
e4abb2605f Add "Review" automations category
STOMAIL-7352
2025-08-11 13:27:03 +02:00
 Ján Mikláš
f9ff9e6093 Clarify what automationSteps mean in template capabilities
https://github.com/mailpoet/mailpoet-premium/pull/856

STOMAIL-7352
2025-08-11 13:27:03 +02:00
Pavel Dohnal
53af2259fc Fix email editing for duplicated automation steps
When duplicating a “Send email” step, users were editing the original email
instead of the duplicated one. This happened because the email duplication
only occurred on backend save, but the UI was using the original email ID.

[STOMAIL-7459]
2025-08-11 13:02:34 +02:00
 Ján Mikláš
676a6ccda1 Fix indent
STOMAIL-7459
2025-08-11 13:02:34 +02:00
Pavel Dohnal
26c8e1a234 Refactor code to make it more readable 2025-08-11 13:02:34 +02:00
Pavel Dohnal
8e55c419f7 Fix automation step args not being updated in PUT endpoint 2025-08-11 13:02:34 +02:00
Pavel Dohnal
88969a5308 Fix code review issues
[STOMAIL-7459]
2025-08-11 13:02:34 +02:00
Pavel Dohnal
b0e1115c87 Add a test
[STOMAIL-7459]
2025-08-11 13:02:34 +02:00
Pavel Dohnal
f3d8132755 Add duplication logic for the send email step
[STOMAIL-7459]
2025-08-11 13:02:34 +02:00
Pavel Dohnal
b1c4c41216 Improve the duplication component 2025-08-11 13:02:34 +02:00
Pavel Dohnal
ef856f7db6 Add changelog 2025-08-11 13:02:34 +02:00
Pavel Dohnal
91ab9f7de3 Remove TODO comment
[STOMAIL-7459]
2025-08-11 13:02:34 +02:00
Pavel Dohnal
b2bdcaa436 Hide duplication on trigger steps
[STOMAIL-7459]
2025-08-11 13:02:34 +02:00
Pavel Dohnal
a4bc0577f2 Add free logic for duplication menu item
[STOMAIL-7459]
2025-08-11 13:02:34 +02:00
Pavel Dohnal
c8e8f2f8b9 Add duplicate step menu item
[STOMAIL-7459]
2025-08-11 13:02:34 +02:00
Oluwaseun Olorunsola
5db73649a2 Update GitHub token handling for WooCommerce repositories in CI/CD and scripts
- Replace general GitHub token with a specific WooCommerce token in CircleCI config for downloading WooCommerce packages.
- Modify helper functions to use the WooCommerce token when applicable.
- Update sample environment file to include the new WooCommerce token variable.
- Adjust RoboFile methods to utilize the WooCommerce token for downloading WooCommerce-related plugins.

STOMAIL-7508
2025-08-11 09:19:26 +01:00
Eason Su
61258e00d1 Add changelog. 2025-08-11 15:31:34 +08:00
Eason Su
b818b150f2 Declare compatibility with WooCommerce 10.1. 2025-08-11 15:31:34 +08:00
Eason Su
c7c36b4528 Bump the minimum WooCommerce to 10.0.
To align with the L-1 of the upcoming WooCommerce 10.1.
2025-08-11 15:31:34 +08:00
Oluwaseun Olorunsola
397cc67a16 Improve changelog formatting and ensure that the changelogger creates well formated files. 2025-08-08 15:42:11 +02:00
Oluwaseun Olorunsola
7136cb9cc6 Add changelog file 2025-08-08 15:42:11 +02:00
Oluwaseun Olorunsola
648e2a6a91 Refactor logging in FirstPurchase class to reduce code duplication by consolidating logger calls for order date and total shortcodes. 2025-08-08 15:42:11 +02:00
 Ján Mikláš
d08185ed77 Ignore false positive semgrep warnings
STOMAIL-7516
2025-08-08 11:45:50 +01:00
 Ján Mikláš
70cb148d66 Better tools versions management, adds special Tracy version for PHP 8.0-8.3
STOMAIL-7516
2025-08-08 11:45:50 +01:00
 Ján Mikláš
67751b8def Only run PHP 8.4 fixes on PHP 8.4+
STOMAIL-7516
2025-08-08 11:45:50 +01:00
 Ján Mikláš
f14d6e1856 Fix deprecated implicitly marking params as nullable
STOMAIL-7508
2025-08-06 13:49:23 +02:00
 Ján Mikláš
d25d9c9ddf Load different tool versions in PHP 8.2+
STOMAIL-7508
2025-08-06 13:49:23 +02:00
 Ján Mikláš
3bed3e6b0e Fix Carbon in PHP 8.4
STOMAIL-7508
2025-08-06 13:49:23 +02:00
 Ján Mikláš
909c8f5e73 Fix Doctrine prefixer after changes in PHP Scoper 0.18.12
https://github.com/humbug/php-scoper/releases/tag/0.18.12

STOMAIL-7508
2025-08-06 13:49:23 +02:00
 Ján Mikláš
dd84291c47 Update composer.phar with PHP 8.4 support
STOMAIL-7508
2025-08-06 13:49:23 +02:00
 Ján Mikláš
f33215b314 Update Tracy with PHP 8.4 support
STOMAIL-7508
2025-08-06 13:49:23 +02:00
 Ján Mikláš
445b15212c Add PHP 8.4 dev Dockerfile
STOMAIL-7508
2025-08-06 13:49:23 +02:00
Oluwaseun Olorunsola
9aeb1504d2 Release 5.12.13 2025-08-05 13:15:26 +01:00
Yuliyan Slavchev
ebfe55d56a Add changelog 2025-08-04 14:58:31 +02:00
Yuliyan Slavchev
eab55e607e Consider optin option when creating new subscriber from guest customer order 2025-08-04 14:58:31 +02:00
Rostislav Wolny
84c8b0537b Set exclude out of stock products in the dynamic product block as default
STOMAIL-7484
2025-07-30 14:54:29 +02:00
Rostislav Wolny
7d6a54e818 Add changelog
STOMAIL-7484
2025-07-30 14:54:29 +02:00
Rostislav Wolny
ee182a60eb Add filter to define out of stock statuses for dynamic products
STOMAIL-7484
2025-07-30 14:54:29 +02:00
Rostislav Wolny
0cc187bc28 Add tests for dynamicProducts out of stock behavior
STOMAIL-7484
2025-07-30 14:54:29 +02:00
Rostislav Wolny
93562e5081 Fix fetching selected products in dynamic products block
The condition was causing an issue that when sending !empty($args['dynamicProductsType'])
was always true and selected products were never sent.

STOMAIL-7484
2025-07-30 14:54:29 +02:00
Rostislav Wolny
ef79da8d86 Add option to filter products that are out of stock to dynamic products block
STOMAIL-7484
2025-07-30 14:54:29 +02:00
Yuliyan Slavchev
e6bcb2aa73 Skip SendGrid email send test if API key is not set 2025-07-29 16:59:00 +02:00
Rostislav Wolny
15db64cb8f Update form-data and on-headers 2025-07-29 12:20:40 +02:00
github-actions[bot]
1b75968004 Update used WooCommerce plugin in Circle CI
- latest version: 10.0.4
 - previous version: 9.9.5
2025-07-28 13:11:15 +03:00
Pavel Dohnal
b08e725650 Move the changelog readme from the changelog directory 2025-07-23 11:57:42 +02:00
Rostislav Wolny
2cff008340 Use the local test site when testing if the site is reachable
It seems that Circle CI has occasional issues with pinging example.com
This commit updates the test to ping test site running in the docker environment.
There is a fallback to example.com for cases when a developer doesn't use the test environment.
STOMAIL-7481
2025-07-23 10:12:39 +02:00
Rostislav Wolny
fef053e760 Increase the socket connect timeout when testing site url is reachable
This is most probably causing test flakiness, but could also cause issues
for sites that use ports in the site URL.
STOMAIL-7481
2025-07-22 15:37:06 +02:00
Rostislav Wolny
f6fd6769c5 Fix changelog in readme.txt 2025-07-22 15:12:04 +02:00
Rostislav Wolny
c3ab4881ff Update changelog and restore deleted changelog system README.md 2025-07-22 15:12:04 +02:00
Rostislav Wolny
f9d18e9499 Release 5.12.12 2025-07-22 15:12:04 +02:00
Pavel Dohnal
34529a98f9 Use note_type from subject args in OrderNoteAddedTrigger
Avoids unnecessary database calls by retrieving note_type from the CommentSubject’s args.

[STOMAIL-7366]
2025-07-22 11:37:43 +02:00
 Ján Mikláš
24040b1372 Unify trigger title case with other triggers
[STOMAIL-7366]
2025-07-22 11:37:43 +02:00
Pavel Dohnal
b9c57e7d18 Add a validation 2025-07-22 11:37:43 +02:00
Pavel Dohnal
444f77c0b1 Improve the namespace for the test 2025-07-22 11:37:43 +02:00
Pavel Dohnal
6e77a7fd37 Add changelog
[STOMAIL-7366]
2025-07-22 11:37:43 +02:00
Pavel Dohnal
11f79839d2 Add docsblock for Step interface
[STOMAIL-7366]
2025-07-22 11:37:43 +02:00
Pavel Dohnal
5ca3973eaa Add docsblock for Trigger interface
[STOMAIL-7366]
2025-07-22 11:37:43 +02:00
Pavel Dohnal
91987e9fa1 Add an integration test
[STOMAIL-7366]
2025-07-22 11:37:43 +02:00
Pavel Dohnal
0b70e35b7b Add Order Note settings
[STOMAIL-7366]
2025-07-22 11:37:43 +02:00
Pavel Dohnal
60088d0801 Add a new trigger for order note created
[STOMAIL-7366]
2025-07-22 11:37:43 +02:00
github-actions[bot]
82e1c59f0f Update used WooCommerce plugin in Circle CI
- latest version: 10.0.2
 - previous version: 9.9.5
2025-07-21 13:05:08 +02:00
github-actions[bot]
2902f116fd Update used WordPress images in Circle CI
- latest version: 6.8.2-php8.3
 - previous version: 6.7.2
2025-07-21 13:05:08 +02:00
Pavel Dohnal
0819af5409 Order and format changelog entries by importance 2025-07-17 13:14:23 +01:00
Pavel Dohnal
172ca5eacf Move changelog to a new place 2025-07-17 12:16:20 +02:00
Pavel Dohnal
c76b9c4438 Remove changelog examples 2025-07-17 12:16:20 +02:00
Eason Su
fd443f6f42 Add changelog. 2025-07-16 17:11:43 +02:00
Eason Su
4cc1e7eb2d Declare compatibility with WooCommerce 10.0. 2025-07-16 17:11:43 +02:00
Eason Su
f826888d30 Bump the minimum WooCommerce to 9.9.
To align with the L-1 of the upcoming WooCommerce 10.0.
2025-07-16 17:11:43 +02:00
Pavel Dohnal
98167fbc54 Implement file-based changelog system
Replace direct readme.txt editing with individual changelog files in changelog/ directory.
During release, files are compiled into final changelog format and cleared for next release.

This prevents conflicts when multiple PRs add changelog entries simultaneously.
2025-07-16 16:49:02 +02:00
 Ján Mikláš
4b3c8a77b6 Bump MySQL to 5.6
This is due to WooCommerce 9.9 (oldest supported by MailPoet) adding an SQL query which is 5.6+ and WooCommerce fails to activate on MySQL 5.5
2025-07-15 17:51:43 +02:00
 Ján Mikláš
3e776c9c8a Release 5.12.11 2025-07-15 13:20:22 +02:00
 Ján Mikláš
4721993237 Fix lint error
STOMAIL-7473
2025-07-14 22:22:11 +02:00
 Ján Mikláš
136d302cce Fix nitpicky details
STOMAIL-7473
2025-07-14 22:22:11 +02:00
 Ján Mikláš
70922ef934 Add tests
STOMAIL-7473
2025-07-14 22:22:11 +02:00
 Ján Mikláš
38dfa4040a Track form blocks usage
STOMAIL-7473
2025-07-14 22:22:11 +02:00
 Ján Mikláš
723063e77a Add active form usage counts
STOMAIL-7473
2025-07-14 22:22:11 +02:00
github-actions[bot]
8708287ac0 Update used WooCommerce Subscriptions plugin in Circle CI
- latest version: 7.7.0
 - previous version: 7.6.0
2025-07-14 12:40:42 +02:00
github-actions[bot]
4be7a70c09 Update used WooCommerce plugin in Circle CI
- latest version: 10.0.1
 - previous version: 9.9.5
2025-07-14 12:40:42 +02:00
 Ján Mikláš
e9322c34f3 Fix lint errors
STOMAIL-7244
2025-07-11 15:02:22 +02:00
 Ján Mikláš
9dad9e80c8 Convert create-new-segment to TypeScript
STOMAIL-7244
2025-07-11 15:02:22 +02:00
 Ján Mikláš
7fdbec06a5 Add changelog
STOMAIL-7244
2025-07-11 15:02:22 +02:00
 Ján Mikláš
d3e04c7e8f Fix error message position when creating a list during import
STOMAIL-7244
2025-07-11 15:02:22 +02:00
 Ján Mikláš
4348e0cd0e Add changelog
STOMAIL-7267
2025-07-11 11:15:58 +02:00
 Ján Mikláš
e798661190 Fix inconsistent spacing in tags component
STOMAIL-7267
2025-07-11 11:15:58 +02:00
 Ján Mikláš
bfdba12008 Add changelog
STOMAIL-7470
2025-07-10 23:54:31 +02:00
 Ján Mikláš
77c5ed5cde Fix page title replacement broken on non-English sites
STOMAIL-7470
2025-07-10 23:54:31 +02:00
Jan Lysý
2b6d3703ab Exclude wp.com regex from permittedAssetsLocations to fix failing tests in ConflictResolver. 2025-07-10 14:14:03 +02:00
Jan Lysý
e1d0d9331b Fix matching style urls in ConflictResolver
Domains that end with wp.com could match incorrect styles that caused conflicts.
2025-07-10 11:57:25 +01:00
Jan Lysý
585d71c7ce Add changelog for improved JS compatibility 2025-07-10 11:57:25 +01:00
Jan Lysý
750366f4d0 Fix matching script urls in ConflictResolver
Domains that end with wp.com could match incorrect scripts that caused conflicts.
2025-07-10 11:57:25 +01:00
Jan Lysý
5e17a8d291 Release 5.12.10 2025-07-08 13:02:18 +02:00
github-actions[bot]
de6ec0fd6f Update used Automate Woo plugin in Circle CI
- latest version: 6.1.15
 - previous version: 6.0.33
2025-07-07 13:34:56 +02:00
Oluwaseun Olorunsola
7751c32f0d Update mailpoet/assets/css/src/components-plugin/_forms.scss
Fix overflow and border radius issues for the PasswordInput component.

https://github.com/mailpoet/mailpoet/pull/6246#discussion_r2185205608

Co-authored-by: Ján Mikláš <neosinner@gmail.com>
2025-07-07 12:57:28 +02:00
Oluwaseun Olorunsola
8fce0083bc Enhance PasswordInput component with accessibility improvements
- Added aria-labels for the toggle button to improve screen reader support.
- Simplified the return statement for better readability.

STOMAIL-7318
2025-07-07 12:57:28 +02:00
Oluwaseun Olorunsola
0f8d7fa12a Add changelog entry
STOMAIL-7318
2025-07-07 12:57:28 +02:00
Oluwaseun Olorunsola
69164b7432 Refactor KeyInput component to use PasswordInput and remove toggle button functionality
- Replaced the existing input type with PasswordInput for better password handling.
- Removed the toggle button for revealing/hiding the premium key, simplifying the component.

STOMAIL-7318
2025-07-07 12:57:28 +02:00
Oluwaseun Olorunsola
e88ee1f839 Use PasswordInput for amazon ses access key, secret key, and sendgrid api key
STOMAIL-7318
2025-07-07 12:57:28 +02:00
Oluwaseun Olorunsola
09020cbb87 Add PasswordInput component with toggle functionality
- Introduced a new PasswordInput component that allows users to toggle password visibility.
- Updated styles for the password input toggle button.
- Exported the PasswordInput from the form index for easier access.

STOMAIL-7318
2025-07-07 12:57:28 +02:00
Oluwaseun Olorunsola
8f441d6e93 Fix nitpick review comments
STOMAIL-7432
2025-07-07 11:40:51 +02:00
Oluwaseun Olorunsola
fbc38dfee7 Add changelog
STOMAIL-7432
2025-07-07 11:40:51 +02:00
Oluwaseun Olorunsola
5a4bddb559 Add type parameter to unsubscribe URL and update confirmation template
This commit introduces a new private method to append a 'type' parameter to the unsubscribe URL, ensuring consistency with the confirmation page. Additionally, a comment has been added to the confirmation unsubscribe HTML template to remind developers to synchronize changes to the hidden input field with the corresponding PHP code.

STOMAIL-7439
2025-07-07 11:40:51 +02:00
Oluwaseun Olorunsola
67f315786e Update plugin readme copy
STOMAIL-7440
2025-07-02 13:38:59 +01:00
 Ján Mikláš
97091f7681 Add unit tests for MailPoet\Newsletter\Renderer\Columns\Renderer
STOMAIL-7439
2025-07-01 21:41:25 +02:00
 Ján Mikláš
e4f7c75eed Fix PHPStan warning
Argument of an invalid type array|Countable supplied for foreach, only iterables are supported.

STOMAIL-7439
2025-07-01 21:41:25 +02:00
 Ján Mikláš
69f13652d4 Add changelog
STOMAIL-7439
2025-07-01 21:41:25 +02:00
 Ján Mikláš
76bdc42c4a Fix PHP warning when trying to render column without 'blocks' property
STOMAIL-7439
2025-07-01 21:41:25 +02:00
 Ján Mikláš
a71c8409f3 Remove confusing check for presence of $data['type']
It's not used later in the code and can make the whole condition to fail even when `$data['blocks']` is not set or countable, which would result in PHP warning on the next line

STOMAIL-7439
2025-07-01 21:41:25 +02:00
Oluwaseun Olorunsola
94d1917274 Release 5.12.9 2025-07-01 15:14:33 +01:00
 Ján Mikláš
10a69cc8fe Add changelog
STOMAIL-7274
2025-06-30 13:55:44 +02:00
 Ján Mikláš
1cff85c2ab Don't translate MailPoet Page title which is meant to be replaced
This should prevent issue when the page is created in language X and when the website language is switched to language Y, this (435f638011/mailpoet/lib/Subscription/Pages.php (L286)) condition is no longer true and a wrong page title is showed

STOMAIL-7274
2025-06-30 13:55:44 +02:00
 Ján Mikláš
8dc90069bd Add changelog
STOMAIL-7317
2025-06-30 13:01:26 +02:00
 Ján Mikláš
6b9bdfcd6c Apply the latest changes in the form editor in the preview
STOMAIL-7317
2025-06-30 13:01:26 +02:00
 Ján Mikláš
678c5535d6 Add changelog
STOMAIL-7316
2025-06-30 12:30:12 +02:00
 Ján Mikláš
11b5a70842 Fix rendering submit button when font size is changed
STOMAIL-7316
2025-06-30 12:30:12 +02:00
Eason Su
8f07347e82 Revert "Temporarily adjust CircleCI config to test "nightly" workflow."
This reverts commit 404ea57b9506679fa0e738ad59688f60a99beb97.
2025-06-30 08:53:04 +01:00
Eason Su
fdf0c66b45 Temporarily adjust CircleCI config to test "nightly" workflow.
This commit will be reverted later.
2025-06-30 08:53:04 +01:00
Eason Su
8ab3347bf4 Fix the sorting in check_woocommerce_beta.sh to resolve the correct latest beta/RC version.
When WC comes to version 10.0.0, it needs to correct the sort result from
versions=("10.0.0-rc.1" "3.0.0" ... "9.9.4" "9.9.5")
to
versions=("3.0.0" ... "9.9.4" "9.9.5" "10.0.0-rc.1")
to get the target version correctly.
2025-06-30 08:53:04 +01:00
github-actions[bot]
9dc68c21e4 Update used WooCommerce plugin in Circle CI
- latest version: 9.9.5
 - previous version: 9.8.5
2025-06-30 08:52:35 +01:00
 Ján Mikláš
0007782df6 Simplify code
STOMAIL-7297
2025-06-26 22:56:12 +02:00
 Ján Mikláš
899f213afe Apply loading/disabled state on alpha editor dropdown
STOMAIL-7297
2025-06-26 22:56:12 +02:00
 Ján Mikláš
7a3c538ac3 Add changelog
STOMAIL-7297
2025-06-26 22:56:12 +02:00
 Ján Mikláš
aa18080b4f When choosing the email type, only show loading animation on the selected one
STOMAIL-7297
2025-06-26 22:56:12 +02:00
 Ján Mikláš
bea484b540 Remove unused code
STOMAIL-7297
2025-06-26 22:56:12 +02:00
 Ján Mikláš
f3bcd83f6e Add changelog
STOMAIL-7390
2025-06-26 21:49:31 +02:00
 Ján Mikláš
5c786c227c Remove DocsBot code
STOMAIL-7390
2025-06-26 21:49:31 +02:00
 Ján Mikláš
1c8f1e0fc9 Add changelog
STOMAIL-7285
2025-06-26 18:35:48 +02:00
 Ján Mikláš
74a54bbaf2 Add default value for re-engagement emails
This value is taken from the "Inactive subscribers" value. E.g. when the subscribers become inactive after 6 month, the value in re-engagement emails is 5 months.
But when the "Inactive subscribers" feature is turned off, there is no default value.

This PR changes it to 11 months, which would be used when the default "Inactive subscribers" value of 12 months is used

STOMAIL-7285
2025-06-26 18:35:48 +02:00
 Ján Mikláš
de88a59517 Add changelog 2025-06-26 16:16:50 +02:00
 Ján Mikláš
480c2deb80 Fix fatal error in SCF or ACF when working with post templates
STOMAIL-7433
2025-06-26 16:16:50 +02:00
 Ján Mikláš
dadca0ae4a Unify changelog format 2025-06-25 11:27:23 +08:00
Eason Su
5d57aeea1a Release 5.12.8 2025-06-25 11:27:23 +08:00
Pavel Dohnal
bed2ad7d76 Add changelog 2025-06-23 15:05:29 +02:00
Pavel Dohnal
c006fc6b5a Flip order status filter logic to support custom statuses
The previous implementation only included specific order statuses in
custom segments, which meant that non-standard statuses from plugins
were ignored. This change flips the logic to exclude specific statuses
instead.

This ensures that orders with custom status values from third-party
plugins will now be properly included in dynamic segments.

[STOMAIL-7384]
2025-06-23 15:05:29 +02:00
github-actions[bot]
6e89e6666f Update used WooCommerce plugin in Circle CI
- latest version: 9.9.4
 - previous version: 9.8.5
2025-06-23 15:12:16 +08:00
Pavel Dohnal
59a1862b86 Add a unit test for Renderer class 2025-06-20 12:12:22 +02:00
Pavel Dohnal
1e9682ab32 Add changelog 2025-06-20 12:12:22 +02:00
Pavel Dohnal
630dc99b49 Improve the rendering condition 2025-06-20 12:12:22 +02:00
Pavel Dohnal
4b83d00310 Make the code to be defensive and supress any warnings
https://wordpress.org/support/topic/php-warning-undefined-array-key-blocks/
2025-06-20 12:12:22 +02:00
Marianne
06e9f43d7b Add changelog. 2025-06-20 08:33:23 +03:00
Marianne
a6a31d0572 Adds Polylang to the list of permitted scripts. 2025-06-20 08:33:23 +03:00
Pavel Dohnal
0b3481ae34 Release 5.12.7 2025-06-17 11:29:15 +02:00
github-actions[bot]
d04bf3c627 Update used WooCommerce Subscriptions plugin in Circle CI
- latest version: 7.6.0
 - previous version: 7.5.0
2025-06-16 08:38:21 +02:00
github-actions[bot]
af9cd5dd74 Update used WooCommerce plugin in Circle CI
- latest version: 9.9.3
 - previous version: 9.8.5
2025-06-16 08:38:21 +02:00
 Ján Mikláš
0b069d2252 Sort form names and email subjects alphabetically for API error messages 2025-06-13 10:30:11 +02:00
 Ján Mikláš
cc67d44d5b Add changelog
STOMAIL-7426
2025-06-11 21:38:56 +02:00
 Ján Mikláš
c1810d4d27 Bump minimum and tested up to WooCommerce versions
I intentionally removed the patch version to make it more general

STOMAIL-7426
2025-06-11 21:38:56 +02:00
 Ján Mikláš
b3824efb2f Potentially fix flaky addCouponAndSelectPredefinedCoupon 2025-06-11 15:44:56 +02:00
 Ján Mikláš
abc0ce3349 Release 5.12.6 2025-06-10 13:50:05 +02:00
 Ján Mikláš
b75aa6d03c Fix incorrect path for Linkedin icon
STOMAIL-7323
2025-06-09 14:57:38 +02:00
 Ján Mikláš
455c0f5d6f Fix black X icon on dark background in Engineering and Birds templates
STOMAIL-7323
2025-06-09 14:57:38 +02:00
 Ján Mikláš
d0e20b31fe Add changelog
STOMAIL-7323
2025-06-09 14:57:38 +02:00
 Ján Mikláš
a7645456a6 Replace old Twitter with new X icon in templates
STOMAIL-7323
2025-06-09 14:57:38 +02:00
 Ján Mikláš
88cfcf17e3 Update templates to use new social icons
STOMAIL-7323
2025-06-09 14:57:38 +02:00
 Ján Mikláš
8f77790113 Hide legacy icons sets by default, with checkbox to show them
This is to keep backwards compatibility with existing emails but to direct new emails to use new icon sets

STOMAIL-7323
2025-06-09 14:57:38 +02:00
 Ján Mikláš
efd4597293 Add fallback to missing icons for legacy icon sets
STOMAIL-7323
2025-06-09 14:57:38 +02:00
 Ján Mikláš
890d8414e1 Allow selecting new social networks
STOMAIL-7323
2025-06-09 14:57:38 +02:00
 Ján Mikláš
5d98da2f50 Sort social icons alphabetically
STOMAIL-7323
2025-06-09 14:57:38 +02:00
 Ján Mikláš
4af2cf69e3 Add two new social icon sets
STOMAIL-7323
2025-06-09 14:57:38 +02:00
 Ján Mikláš
66828dd3d8 Simplify link label in social icons block
STOMAIL-7323
2025-06-09 14:57:38 +02:00
 Ján Mikláš
92a186b5da Add white social icons
STOMAIL-7323
2025-06-09 14:57:38 +02:00
 Ján Mikláš
79cfeca174 Add official social icons
STOMAIL-7323
2025-06-09 14:57:38 +02:00
 Ján Mikláš
07d3e66adb Add changelog
STOMAIL-7250
2025-06-09 13:54:45 +02:00
 Ján Mikláš
c43a0fdb61 Hide 'unsubscribe' bulk action when segmenting unsubscribed subscribers
STOMAIL-7250
2025-06-09 13:54:45 +02:00
 Ján Mikláš
e56d4c931f Change getBulkActions() from arrow to normal function
This is only so the diff in next commit is much easier to understand

STOMAIL-7250
2025-06-09 13:54:45 +02:00
 Ján Mikláš
fc061fc729 Fix test flakiness by allowing 1s difference 2025-06-09 12:17:15 +02:00
github-actions[bot]
7ce6e34d3d Update used Automate Woo plugin in Circle CI
- latest version: 6.1.14
 - previous version: 6.0.33
2025-06-09 12:17:15 +02:00
github-actions[bot]
3218f5cf5a Update used WooCommerce plugin in Circle CI
- latest version: 9.9.2
 - previous version: 9.8.5
2025-06-09 12:17:15 +02:00
Rostislav Wolny
c6f985bebc Update Docker images for performace tests
We can fully switch to WordPress official images as we no longer need PDO.
2025-06-09 09:53:05 +02:00
Rostislav Wolny
f612002a95 Fix the selector on the automation template page 2025-06-09 09:53:05 +02:00
Rostislav Wolny
ba365de739 Fix the error with installing "latest" plugin on startup
Plugin "latest" doesn't exist.
wp plugin install woocommerce should install latest plugin.
2025-06-09 09:53:05 +02:00
Rostislav Wolny
2a70bb4efa Update tar-fs 2025-06-09 07:33:39 +02:00
0d68242a47 Merge tag '5.12.5' 2025-06-05 07:40:08 -05:00
Rostislav Wolny
dd905494f3 Release 5.12.5 2025-06-03 13:57:37 +02:00
0bcb343de7 Merge tag '5.12.4'
All checks were successful
Make release / release (push) Successful in 1h25m32s
2025-06-02 21:30:47 -05:00
Rostislav Wolny
e6a8a91c95 Release 5.12.5 2025-06-02 15:07:00 +02:00
 Ján Mikláš
5c79be68bb Fix changelog format
STOMAIL-7423
2025-06-02 11:51:56 +02:00
 Ján Mikláš
290ffce870 Update readme.txt to include more MailPoet features
STOMAIL-7423
2025-06-02 11:51:56 +02:00
github-actions[bot]
10e852697e Update used Automate Woo plugin in Circle CI
- latest version: 6.1.13
 - previous version: 6.0.33
2025-06-02 10:26:48 +02:00
Yuliyan Slavchev
9ac44da59f Add changelog 2025-05-30 08:48:12 +01:00
Yuliyan Slavchev
d98f06ab2a Fix linking duplicated Newsletter with global $post object 2025-05-30 08:48:12 +01:00
Yuliyan Slavchev
edb968f0c5 Fix ServicesTest to properly verify premium status response 2025-05-28 22:33:08 +02:00
Yuliyan Slavchev
52b797a179 Add changelog 2025-05-28 15:05:41 +02:00
Yuliyan Slavchev
4e875793b7 Add "4th" as option for nthWeekDay interval type 2025-05-28 15:05:41 +02:00
Yuliyan Slavchev
8cc70831be Release 5.12.4 2025-05-27 16:33:20 +03:00
Yuliyan Slavchev
244ca8a43e Release 5.12.4 2025-05-26 15:07:35 +03:00
github-actions[bot]
6221ab3aac Update used WooCommerce Subscriptions plugin in Circle CI
- latest version: 7.5.0
 - previous version: 7.4.0
2025-05-26 11:03:43 +03:00
 Ján Mikláš
0299448be2 Prevent conflicts with other keydown events on Dotcom
STOMAIL-7415
2025-05-22 15:12:05 +02:00
 Ján Mikláš
b06d8dd6b6 Fix missing space when scheduling an email
STOMAIL-7287
2025-05-22 15:12:05 +02:00
 Ján Mikláš
f6c73b471e Fix haw.js file being processed by webpack, which could fail in CircleCI
STOMAIL-7415
2025-05-22 11:20:16 +02:00
 Ján Mikláš
502e1f6f65 Pass chat ID to the support form
STOMAIL-7415
2025-05-22 11:20:16 +02:00
 Ján Mikláš
2b6824caaf Only show "Contact support" link once after the first message
There is no direct support for that, that's why it's checking every 2s if the chat ID is set, which happens when the first reply is shown

STOMAIL-7415
2025-05-22 11:20:16 +02:00
 Ján Mikláš
ca86238344 Add "Contact support" link to Odie
STOMAIL-7415
2025-05-22 11:20:16 +02:00
 Ján Mikláš
e45b9b3a4f Fix showing first message
STOMAIL-7415
2025-05-22 11:20:16 +02:00
 Ján Mikláš
149aa04898 Fix compiling haw.js file 2025-05-20 13:34:43 +01:00
Oluwaseun Olorunsola
9be4ac8db9 Release 5.12.3 2025-05-20 12:50:56 +01:00
 Ján Mikláš
7c18e9561f Enable Odie chatbot feature by default
Based on discussion in pcD9cT-ap9-p2, we enable Odie by default, but I'm keeping DocsBot still in the code, in case the performance of Odie turns out worse and we need to switch back to DocsBot.

STOMAIL-7389
2025-05-20 10:37:55 +02:00
 Ján Mikláš
9e6669db2d Show Odie chatbot when feature is enabled
STOMAIL-7389
2025-05-20 10:37:55 +02:00
 Ján Mikláš
27cbddcdc3 Only load DocsBot when Odie feature flag is turned off
STOMAIL-7389
2025-05-20 10:37:55 +02:00
 Ján Mikláš
4c1c447f70 Add happiness-assistant-widget.js script
STOMAIL-7389
2025-05-20 10:37:55 +02:00
 Ján Mikláš
b584ed3f1e Add feature flag for Odie chatbot
STOMAIL-7389
2025-05-20 10:37:55 +02:00
 Ján Mikláš
460987414c Replace inline SVG logo with CDN version
STOMAIL-7407
2025-05-19 11:39:34 +02:00
 Ján Mikláš
de15d38ff5 Remove no longer needed method
STOMAIL-7407
2025-05-19 11:39:34 +02:00
 Ján Mikláš
ffe3eadd55 Add changelog
STOMAIL-7407
2025-05-19 11:39:34 +02:00
 Ján Mikláš
3719441bed Remove unused CSS
STOMAIL-7407
2025-05-19 11:39:34 +02:00
 Ján Mikláš
4baadb9c22 Vertically center list bullets
STOMAIL-7407
2025-05-19 11:39:34 +02:00
 Ján Mikláš
b6cc49fe4a Remove unnecessary cents on the upgrade page
STOMAIL-7407
2025-05-19 11:39:34 +02:00
 Ján Mikláš
bbdecc59e7 Remove old upgrade page
STOMAIL-7407
2025-05-19 11:39:34 +02:00
 Ján Mikláš
977c1d4e72 Fix styling issues on upgrade page
STOMAIL-7407
2025-05-19 11:39:34 +02:00
 Ján Mikláš
0eeb2b7d6e Simplify upgrade page links
We no longer have tier-based plans, and we don't show the Upgrade page for paying customers anymore

STOMAIL-7407
2025-05-19 11:39:34 +02:00
 Ján Mikláš
d01e262252 Update current MailPoet plans on the upgrade page
STOMAIL-7407
2025-05-19 11:39:34 +02:00
 Ján Mikláš
5db22fe20c Allow viewing Upgrade page when directly accessed via URL
STOMAIL-7407
2025-05-19 11:39:34 +02:00
 Ján Mikláš
b86cc5e419 Update tracking events
STOMAIL-7407
2025-05-19 11:39:34 +02:00
 Ján Mikláš
41b879d515 Remove unnecessary upgrade page title and description
STOMAIL-7407
2025-05-19 11:39:34 +02:00
 Ján Mikláš
aa87ceb75e Fix minor UI details in monthly/yearly toggle on the upgrade page
STOMAIL-7407
2025-05-19 11:39:34 +02:00
 Ján Mikláš
7ab80522bd Always show full MailPoet logo in top bar
STOMAIL-7407
2025-05-19 11:39:34 +02:00
github-actions[bot]
ac3708f68e Update used Automate Woo plugin in Circle CI
- latest version: 6.1.12
 - previous version: 6.0.33
2025-05-19 10:12:59 +01:00
github-actions[bot]
555947faa9 Update used WooCommerce plugin in Circle CI
- latest version: 9.8.5
 - previous version: 9.7.1
2025-05-19 10:12:59 +01:00
Jan Lysý
923b5532e2 Add creating WC Transactional newsletter into Settings data factory 2025-05-14 13:27:27 +02:00
Jan Lysý
4b0a7e7217 Release 5.12.2 2025-05-13 14:57:47 +02:00
github-actions[bot]
991ec2b549 Update used WooCommerce plugin in Circle CI
- latest version: 9.8.4
 - previous version: 9.7.1
2025-05-12 13:30:17 +02:00
 Ján Mikláš
e8972c6d49 Add changelog
STOMAIL-7263
2025-05-12 13:25:48 +02:00
 Ján Mikláš
8fa45e3917 Count number of subscribers who will be removed from all lists
The DELETE otherwise returns number of deleted rows, which is in fact number of lists subscribers were removed from

STOMAIL-7263
2025-05-12 13:25:48 +02:00
 Ján Mikláš
7b79c82f71 Refactor constants to functions
The reason is, that translation strings outside any function weren't translated at all, even if they are present in .pot

STOMAIL-7263
2025-05-12 13:25:48 +02:00
 Ján Mikláš
2d25d76396 Refactor subscribers list translations
STOMAIL-7263
2025-05-12 13:25:48 +02:00
 Ján Mikláš
7fef1c9ef2 Revert "Update QIT CLI package to the latest version"
This reverts commit 6f22a23ada.
2025-05-08 12:52:48 +02:00
 Ján Mikláš
67396366e9 Improve robustness of acceptance tests when editing a list, a segment, or a subscriber
STOMAIL-7406
2025-05-08 12:52:48 +02:00
 Ján Mikláš
1da866cfe0 Hide bulk checkbox on listing page when loading
This aims to improve robustness of tests, where clicking this checkbox before the loading is finished would not select anything

STOMAIL-7404
2025-05-07 16:25:35 +02:00
 Ján Mikláš
6f22a23ada Update QIT CLI package to the latest version 2025-05-06 22:09:11 +02:00
 Ján Mikláš
ca3c15b529 Update KB links
STOMAIL-7402
2025-05-06 22:09:11 +02:00
e674cfe30e Merge tag '5.12.1'
All checks were successful
Make release / release (push) Successful in 53m18s
2025-05-06 12:03:51 -05:00
 Ján Mikláš
308ae89ca7 Update SwitchingLanguage test
STOMAIL-7403
2025-05-06 17:20:53 +02:00
 Ján Mikláš
217c6fe9eb Release 5.12.1 2025-05-06 13:43:40 +02:00
 Ján Mikláš
ef31486d2e Release 5.12.1 2025-05-06 10:53:11 +02:00
Pavel Dohnal
03e10b96e9 Add changelog
[STOMAIL-7383]
2025-05-06 10:11:46 +02:00
Pavel Dohnal
54359dc610 Fix handling of Japanese characters in custom field blocks
[STOMAIL-7383]
2025-05-06 10:11:46 +02:00
 Ján Mikláš
5c7a746470 Add changelog
STOMAIL-7401
2025-05-05 21:49:38 +02:00
 Ján Mikláš
83033c7991 Fix listing action items overlaying with row border
STOMAIL-7401
2025-05-05 21:49:38 +02:00
 Ján Mikláš
b480fb510f Fix failing tests in May in years when February has 28 days
STOMAIL-7400
2025-05-05 19:17:25 +02:00
c1ced0cc73 Merge tag '5.12.0'
All checks were successful
Make release / release (push) Successful in 49m58s
2025-05-05 12:07:44 -05:00
Rostislav Wolny
043d8d187b Add changelog
STOMAIL-7397
2025-05-05 15:07:00 +02:00
Rostislav Wolny
1faf5822a2 Update Migration_20230831_143755_Db to work properly with multi query
STOMAIL-7397
2025-05-05 15:07:00 +02:00
github-actions[bot]
0898ed7b56 Update used Automate Woo plugin in Circle CI
- latest version: 6.1.11
 - previous version: 6.0.33
2025-05-05 13:37:22 +02:00
github-actions[bot]
d5908a6fb9 Update used WooCommerce plugin in Circle CI
- latest version: 9.8.3
 - previous version: 9.7.1
2025-05-05 13:37:22 +02:00
github-actions[bot]
b6ed846b8b Update used WordPress images in Circle CI
- latest version: 6.8.1-php8.3
 - previous version: 6.7.2
2025-05-05 13:37:22 +02:00
Rostislav Wolny
75cf32c211 Fix the link to the woo settings in the marketing optin block 2025-05-05 12:41:12 +02:00
Rostislav Wolny
80e0a92243 Declare Woo checkout opt-in block compatible with API v3 2025-05-05 12:41:12 +02:00
Rostislav Wolny
2ccaff11ae Update subscription form block to declare compatibility with api v3
This allows the Block editor to run in iframe mode.
The iframe mode is more performant and expected in QIT tests.
2025-05-05 12:41:12 +02:00
Pavel Dohnal
d98722a94a Split a long query into chunks
[STOMAIL-7399]
2025-05-05 10:39:42 +02:00
Pavel Dohnal
3b75c10670 Re-subscribe subscribers into the segments
when a bot unsubscribes subscriber
they are unsubscribed globaly and in segment
this adds them back

[STOMAIL-7399]
2025-05-05 10:39:42 +02:00
Pavel Dohnal
7dea7bbf00 Add a test to check Subscriber Segments
Since the bot clicks to an unsubscribe link

the subscriber is alos unsubscribed from the segments

[STOMAIL-7399]
2025-05-05 10:39:42 +02:00
Pavel Dohnal
f6c81b2583 Add a data factory for Subscriber Segments
[STOMAIL-7399]
2025-05-05 10:39:42 +02:00
Pavel Dohnal
8bc5c1b976 Refactor SQL query into two separate queries
[STOMAIL-7399]
2025-05-05 10:39:42 +02:00
Rostislav Wolny
2f77fc3912 Add migration to re-subscribe subscribers unsubscribed by bots
In the migration, we consider subscribers who made three and more clicks
and unsubscribed within 4 seconds before and 4 seconds after unsubscribe
as unsubscribed by a bot.

From research of affected sites, it seems that the issue started in late March or early April.
So we restrict the date to the start of March.
STOMAIL-7399
2025-05-05 10:39:42 +02:00
Pavel Dohnal
3d970898d7 Upgrade vulnerable dependencies http-proxy-middleware 2025-04-30 12:01:26 +02:00
Pavel Dohnal
ff3614821a Release 5.12.0 2025-04-30 07:43:38 +02:00
Pavel Dohnal
6acf7a5137 Release 5.12.0 2025-04-30 07:43:38 +02:00
Pavel Dohnal
e9127734b2 Release 5.12.0 2025-04-30 07:43:38 +02:00
Pavel Dohnal
99bf0d5a09 Release 5.12.0
Some checks failed
Email Editor Package Tests / build (7.4) (push) Has been cancelled
Email Editor Package Tests / build (8.2) (push) Has been cancelled
Email Editor Package Tests / code-style (push) Has been cancelled
Email Editor Package Tests / phpstan-static-analysis (7.4) (push) Has been cancelled
Email Editor Package Tests / phpstan-static-analysis (8.2) (push) Has been cancelled
2025-04-29 13:14:33 +02:00
Pavel Dohnal
c5ae72a326 Release 5.12.0 2025-04-29 13:12:26 +02:00
Pavel Dohnal
fa427b567a Release 5.12.0 2025-04-29 12:59:58 +02:00
Rostislav Wolny
6209f7989c Add request_method parameter to the unsubscribe confirmation form URL
The form is sent via POST, but in case there are some redirects
configured on the server, it may end up as GET causing unsubscribed not to work.

The parameter ensures it is always processed as it came via POST.
STOMAIL-7396
2025-04-29 12:54:06 +02:00
Rostislav Wolny
cc8786af5c Update acceptance tests for unsubscribe links
We newly check if POST request to the url from List-Unsubscribe works as expected
and also that GET requestl to List-Unsubscribe renders the confirmation page.

STOMAIL-7396
2025-04-29 12:54:06 +02:00
Rostislav Wolny
909d72af4c Pass the original HTTP method for when List-Unsubscribe uses a tracking URL
When we use a tracking URL in List-Unsubscribe header and the one-click unsubscribe request is sent via POST
the click tracking code redirects via 302 and the request becomes GET.

We started to render the unsubscribe confirmation page for GET requests, so the one-click unsubscribe was broken.
This commit fixes it by passing the original method via a query parameter. We look into the query parameter
when we determine whether we want to unsubscribe or render the confirmation page.

We could also achieve the same using 307 for redirects, but I have a concern that 307 might not work properly
with old email clients or bots.
STOMAIL-7396
2025-04-29 12:54:06 +02:00
Rostislav Wolny
b148498527 Fix preview functionality for the unsubscribe page
The preview needs to be handled via GET, and it doesn't contain the token, which is required for unsubscribe.
When preview is present
STOMAIL-7396
2025-04-29 12:54:06 +02:00
Rostislav Wolny
918b2c5a0b Fix behavior when unsubscribe confirmation is disabled via a filter
STOMAIL-7396
2025-04-29 12:54:06 +02:00
Rostislav Wolny
e996a4ab73 Allow unsubscribe only by a POST request
We don't want to allow GET to avoid accidental unsubscribes by bots.
The one-click URL should support only GET.

Instead of unsubscribing, we display the confirmation page on GET.

We also need to refactor the Confirmation page to use POST.
I added a parameter 'type' to distinguish if the unsubscribe comes from one-click or confirmation page.
STOMAIL-7396
2025-04-29 12:54:06 +02:00
 Ján Mikláš
343c073f61 Improve translations
STOMAIL-7300
2025-04-29 11:53:39 +02:00
 Ján Mikláš
489ff284a6 Add missing translation
STOMAIL-7300
2025-04-29 11:53:39 +02:00
 Ján Mikláš
f50b87029b Hide Dynamic Products block from confirmation email template
STOMAIL-7324
2025-04-29 10:26:27 +02:00
 Ján Mikláš
9143902093 Fix missing space between back button and tabs
STOMAIL-7324
2025-04-29 10:26:27 +02:00
 Ján Mikláš
2d65801335 Update MailPoet orange color to WP theme color
STOMAIL-7324
2025-04-29 10:26:27 +02:00
 Ján Mikláš
0c5fe5eeec Fix tests
STOMAIL-7324
2025-04-29 10:26:27 +02:00
 Ján Mikláš
04e0b57ec3 Refactor form translations, remove some unused ones
STOMAIL-7324
2025-04-29 10:26:27 +02:00
 Ján Mikláš
3fd2d1e590 Use sentence case for CTAs
STOMAIL-7324
2025-04-29 10:26:27 +02:00
 Ján Mikláš
cac529617a Return top bar to all MailPoet pages
STOMAIL-7324
2025-04-29 10:26:27 +02:00
 Ján Mikláš
1fa4f4b465 Add changelog
STOMAIL-7324
2025-04-29 10:26:27 +02:00
 Ján Mikláš
397b91654e Convert subscribers/form to TypeScript
STOMAIL-7324
2025-04-29 10:26:27 +02:00
 Ján Mikláš
a0ea543143 Convert subscribers/heading to TypeScript
STOMAIL-7324
2025-04-29 10:26:27 +02:00
 Ján Mikláš
55dda282cd Convert newsletters/types/notification/notification to TypeScript
STOMAIL-7324
2025-04-29 10:26:27 +02:00
 Ján Mikláš
34ef74a7f8 Convert newsletters/newsletters to TypeScript
STOMAIL-7324
2025-04-29 10:26:27 +02:00
 Ján Mikláš
c94ac52f28 Convert newsletters/listings/heading to TypeScript
STOMAIL-7324
2025-04-29 10:26:27 +02:00
 Ján Mikláš
d308a2c322 Convert help/help to TypeScript
STOMAIL-7324
2025-04-29 10:26:27 +02:00
 Ján Mikláš
0887119abb Convert forms/heading to TypeScript
STOMAIL-7324
2025-04-29 10:26:27 +02:00
 Ján Mikláš
e22e721e97 Fix acceptance tests
STOMAIL-7324
2025-04-29 10:26:27 +02:00
 Ján Mikláš
6d047fd9d0 Unify subscribers import and export headers
STOMAIL-7324
2025-04-29 10:26:27 +02:00
 Ján Mikláš
c74fe471a0 Remove white background from pages
STOMAIL-7324
2025-04-29 10:26:27 +02:00
 Ján Mikláš
17ea1a649d Unify count badge in categories and templates
STOMAIL-7324
2025-04-29 10:26:27 +02:00
 Ján Mikláš
44a82bcb7b Show page title in Settings and Help
STOMAIL-7324
2025-04-29 10:26:27 +02:00
 Ján Mikláš
26c985884e Unify tabs with WordPress styles
STOMAIL-7324
2025-04-29 10:26:27 +02:00
 Ján Mikláš
9a243e9df2 Unify titles when adding/editing a list or subscriber
STOMAIL-7324
2025-04-29 10:26:27 +02:00
 Ján Mikláš
2196c79b93 Vertically align back button in page headers
STOMAIL-7324
2025-04-29 10:26:27 +02:00
 Ján Mikláš
d46b5354e3 Fix spacing in page headers
STOMAIL-7324
2025-04-29 10:26:27 +02:00
 Ján Mikláš
d366cc9ac8 Add MailPoet logo to landing page
STOMAIL-7324
2025-04-29 10:26:27 +02:00
 Ján Mikláš
815503bf4e Remove top bar, which no longer server any purpose
STOMAIL-7324
2025-04-29 10:26:27 +02:00
 Ján Mikláš
6e606b2f91 Unify listing categories styles
STOMAIL-7324
2025-04-29 10:26:27 +02:00
 Ján Mikláš
6e4b4ed32e Unify page title buttons with WordPress
STOMAIL-7324
2025-04-29 10:26:27 +02:00
 Ján Mikláš
51f0dadbd2 Unify naming when adding new entity
STOMAIL-7324
2025-04-29 10:26:27 +02:00
 Ján Mikláš
8000a07b69 Remove unused "design" prop
STOMAIL-7324
2025-04-29 10:26:27 +02:00
 Ján Mikláš
4199368f39 Unify subscribers count message rendering
STOMAIL-7324
2025-04-29 10:26:27 +02:00
 Ján Mikláš
305083a029 Add page titles to all listing pages
STOMAIL-7324
2025-04-29 10:26:27 +02:00
 Ján Mikláš
1f51a375d3 Add changelog 2025-04-28 22:29:49 +02:00
 Ján Mikláš
1f251a51e2 Fix parsing nl2br parameter in Custom HTML block in form editor
STOMAIL-7249
2025-04-28 22:29:49 +02:00
 Ján Mikláš
5a177a7d0f Add changelog
STOMAIL-7341
2025-04-28 21:54:36 +02:00
 Ján Mikláš
b6c2b5e070 Remove alternative text from the avatar image
It adds no additional context as the same content is written right after and screen readers can skip this image completely

STOMAIL-7341
2025-04-28 21:54:36 +02:00
Rostislav Wolny
621e459378 Update tested up to for Woo to 9.8.2 2025-04-28 12:31:53 +02:00
 Ján Mikláš
c6525aa133 Use project-specific GitHub client when fetching the latest release
When only free plugin client was used, once the free plugin was released, the release script for premium plugin used the just released version of the free and bumped the minor version again - but that didn't exist in the premium repo.

This way, each plugin checks its own releases. This shouldn't affect determining if patch or minor version should be bumped, because premium release always updates minor, and the free release checks the presence of the `release` branch in the premium repo.

STOMAIL-7398
2025-04-28 10:50:35 +02:00
 Ján Mikláš
a5b03e4b37 When the version already exist in changelog, use it instead of using fallback
STOMAIL-7398
2025-04-28 10:50:35 +02:00
github-actions[bot]
85f99d61da Update used WooCommerce plugin in Circle CI
- latest version: 9.8.2
 - previous version: 9.7.1
2025-04-28 09:05:39 +02:00
Rostislav Wolny
4ba4f167dd Allow skipping WooMemberships test 2025-04-25 11:39:17 +02:00
 Ján Mikláš
c253757faa Add changelog
STOMAIL-7251
2025-04-25 08:23:54 +02:00
 Ján Mikláš
ab6601e68b Optimize the rest of the images with TinyPNG
STOMAIL-7251
2025-04-25 08:23:54 +02:00
 Ján Mikláš
952b8ecd42 Optimize form template images with TinyPNG
STOMAIL-7251
2025-04-25 08:23:54 +02:00
 Ján Mikláš
d5071ebc93 Optimize template images with TinyPNG
STOMAIL-7251
2025-04-25 08:23:54 +02:00
Rostislav Wolny
0b701851e9 Install de_DE language to the site during Docker bootstrap
This fixes an issue with the test that switches languages and
It had to wait a long time to ensure the languages are installed.
2025-04-24 16:19:52 +02:00
Rostislav Wolny
f9e3322236 Update AdminUserSubscription test to work with WP 6.8 2025-04-24 16:19:52 +02:00
Rostislav Wolny
3f239f55ad Add temporary patch for WP CLI issue with _load_textdomain_just_in_time
There is a fix in https://github.com/woocommerce/woocommerce/pull/57291
but it will be released probably in 9.9.0.

This commit adds a temporary fix that replaces
problematic FeaturesUtil::feature_is_enabled( 'blueprint' ) with false.

This should be fine as we don't test with the blueprint feature enabled.
2025-04-24 16:19:52 +02:00
github-actions[bot]
7b98a25c24 Update used WooCommerce Subscriptions plugin in Circle CI
- latest version: 7.4.0
 - previous version: 7.3.1
2025-04-24 16:19:52 +02:00
github-actions[bot]
0c687179ff Update used Automate Woo plugin in Circle CI
- latest version: 6.1.10
 - previous version: 6.0.33
2025-04-24 16:19:52 +02:00
github-actions[bot]
e22f382a36 Update used WordPress images in Circle CI
- latest version: 6.8.0-php8.3
 - previous version: 6.7.2
2025-04-24 16:19:52 +02:00
Rostislav Wolny
c531c5144f Update WordPress version in oldest tests in nightly 2025-04-24 09:11:58 +02:00
 Ján Mikláš
3f0ec31d08 Fix failing tests
There were still products from BuysAProductTriggerTest in the database, and because we set date_created to past, different products were chosen in the preview. Removing the date_created should make ACC products the most recent ones to be picked in the preview.
2025-04-23 13:33:15 +02:00
 Ján Mikláš
6350652dcc Prefix integration tests product names 2025-04-23 13:33:15 +02:00
 Ján Mikláš
009c0180bd Move AbandonedCartContentTest to Woo group 2025-04-23 13:33:15 +02:00
 Ján Mikláš
3be20d7488 Remove unused code 2025-04-23 13:33:15 +02:00
Rostislav Wolny
b4d4fc0901 Improve cleanup in Woo-related tests 2025-04-23 13:33:15 +02:00
Rostislav Wolny
f3f1b9fa70 Update Renderer test to run within Woo group
The test now requires WooCommerce because of the dynamic product block test case.
2025-04-23 13:33:15 +02:00
Rostislav Wolny
1a712e31db Update changelog 2025-04-23 13:33:15 +02:00
Rostislav Wolny
573ee5d70d Release 5.11.0 2025-04-23 13:33:15 +02:00
Rostislav Wolny
5b7c7720f2 Update compatibility with WooCommerce
STOMAIL-7392
2025-04-22 13:15:49 +02:00
Rostislav Wolny
d694b105a4 Update compatibility with WordPress
STOMAIL-7392
2025-04-22 13:15:49 +02:00
 Ján Mikláš
e210bebb38 Fix missing changelog in Slack and GitHub notifications during release
STOMAIL-7393
2025-04-22 09:38:19 +02:00
Oluwaseun Olorunsola
2abcee6eb6 Fix lint errors 2025-04-18 06:52:14 +08:00
Oluwaseun Olorunsola
f3b1c869de Fix failing integration test.
The tests were failing for the following reasons
* DynamicProducts::getPosts was not fetching WC products because they were not defined correctly.
* The renderer requires some arguments like showDivider, etc that was not included in the object definition.
2025-04-18 06:52:14 +08:00
 Ján Mikláš
31417eb5f7 Add changelog
STOMAIL-7354
2025-04-15 16:21:41 +02:00
 Ján Mikláš
e0f31ce174 Move SendEmailActionTest to woo group
STOMAIL-7354
2025-04-15 16:21:41 +02:00
 Ján Mikláš
bd87c7e896 Update integration tests
STOMAIL-7354
2025-04-15 16:21:41 +02:00
 Ján Mikláš
3b8775e833 Update JS tests
STOMAIL-7354
2025-04-15 16:21:41 +02:00
 Ján Mikláš
92b71cf7df Modify how dynamic products are fetched
STOMAIL-7354
2025-04-15 16:21:41 +02:00
 Ján Mikláš
77a85b4454 Update dynamic products block defaults
STOMAIL-7354
2025-04-15 16:21:41 +02:00
 Ján Mikláš
a4a34a8602 Remove misleading comments
STOMAIL-7354
2025-04-15 16:21:41 +02:00
 Ján Mikláš
2f2c55fcaf Add selector for the type of dynamic products to show (order, cross-sell, cart, selected)
STOMAIL-7354
2025-04-15 16:21:41 +02:00
 Ján Mikláš
2115abe2aa Unify spacing in block settings and display options
STOMAIL-7354
2025-04-15 16:21:41 +02:00
 Ján Mikláš
200977ff2a Unify labels in display email block settings
STOMAIL-7354
2025-04-15 16:21:41 +02:00
 Ján Mikláš
bc9caac53a Update display settings in dynamicProducts with product, not post settings
STOMAIL-7354
2025-04-15 16:21:41 +02:00
alex-mpoet
a22341a8e2 Add tests for dynamic products block subject handling
[MAILPOET-6476]
2025-04-15 16:21:41 +02:00
alex-mpoet
0d60d71aea Allow to extend payload handling via filters
[MAILPOET-6476]
2025-04-15 16:21:41 +02:00
alex-mpoet
428d31867e Add a setting for showing order products or cross-sells for order payload
[MAILPOET-6476]
2025-04-15 16:21:41 +02:00
alex-mpoet
2371f8ee27 Add handling of OrderPayload and AbandonedCartPayload
[MAILPOET-6476]
2025-04-15 16:21:41 +02:00
alex-mpoet
82f7980906 Add tests for WC product query in dynamic products block
[MAILPOET-6476]
2025-04-15 16:21:41 +02:00
alex-mpoet
ab9fc2bb40 Use WC product query instead of WP get_posts() for dynamic products
[MAILPOET-6476]
2025-04-15 16:21:41 +02:00
alex-mpoet
375c334be6 Update integration/unit tests
[MAILPOET-6476]
2025-04-15 16:21:41 +02:00
alex-mpoet
e209f79286 Add JS tests
[MAILPOET-6476]
2025-04-15 16:21:41 +02:00
alex-mpoet
8905759c46 Add dynamic products block backend code
[MAILPOET-6476]
2025-04-15 16:21:41 +02:00
alex-mpoet
57c1353ed8 Reorder editor widgets to make space for dynamic products
[MAILPOET-6476]
2025-04-15 16:21:41 +02:00
alex-mpoet
12f695a697 Add dynamic products block styles
[MAILPOET-6476]
2025-04-15 16:21:41 +02:00
alex-mpoet
d87f1beeb6 Add dynamic products block code to editor (based on ALC)
[MAILPOET-6476]
2025-04-15 16:21:41 +02:00
alex-mpoet
169d109828 Add dynamic products block templates and icon
[MAILPOET-6476]
2025-04-15 16:21:41 +02:00
github-actions[bot]
9e01e00707 Update used WooCommerce plugin in Circle CI
- latest version: 9.8.1
 - previous version: 9.7.1
2025-04-15 21:35:39 +08:00
Oluwaseun Olorunsola
90832d2c07 Release 5.10.1 2025-04-15 21:15:08 +08:00
Jan Lysý
590545a586 Update readme.txt to reflect fix related to styles in list elements
[STOMAIL-7386]
2025-04-14 15:57:49 +02:00
Jan Lysý
21b32bd5a5 Fix syntax error in styles for lists
Updated the applyTextAlignment method to ensure proper appending of 'text-align:left;' with a semicolon. Added unit tests to verify functionality for various input cases, ensuring compatibility with existing styles.
[STOMAIL-7386]
2025-04-14 15:57:49 +02:00
 Ján Mikláš
86757212f1 Change how first and last name are saved in WordPress user
In multisite, you can't set first and last name during creation, so the test is updated to create the user and later edit it to change first and last name

STOMAIL-7387
2025-04-14 15:09:19 +02:00
 Ján Mikláš
4cbd13a565 Skip sending confirmation email to create WP user in multisite
STOMAIL-7387
2025-04-14 15:09:19 +02:00
 Ján Mikláš
cbcc4f3bcb Check for different success notice in multisite
STOMAIL-7387
2025-04-14 15:09:19 +02:00
 Ján Mikláš
365e470b16 Remove unnecessary field
STOMAIL-7387
2025-04-14 15:09:19 +02:00
 Ján Mikláš
361c99809c Unify creating WP user
STOMAIL-7387
2025-04-14 15:09:19 +02:00
 Ján Mikláš
f06d3ead1f Don't use underscore in username, which is not allowed on multisite
STOMAIL-7387
2025-04-14 15:09:19 +02:00
 Ján Mikláš
8223ed0b77 Refactor template from PHP to HTML 2025-04-10 14:42:34 +02:00
 Ján Mikláš
70350125a3 Remove trailing whitespace 2025-04-10 14:42:34 +02:00
 Ján Mikláš
a15623469c Remove personal gitignores 2025-04-10 14:42:34 +02:00
 Ján Mikláš
6bbd87a1c9 Update changelog 2025-04-10 14:42:34 +02:00
Rodrigo Estebanez
e0c99b162f add translations for logging 2025-04-10 14:42:34 +02:00
Rodrigo Estebanez
462e7b06c0 move sending logic to AdminUserSubscription 2025-04-10 14:42:34 +02:00
Rodrigo Estebanez
942af0cd88 verify that the email is received in mailhog 2025-04-10 14:42:34 +02:00
Rodrigo Estebanez
1ec97e7fb9 fix-tests 2025-04-10 14:42:34 +02:00
Rodrigo Estebanez
49d68fdd7a add e2e test 2025-04-10 14:42:34 +02:00
Rodrigo Estebanez
9d1d33c26d Fix PhpStan errors in WP.php and AdminUserSubscriptionTest
- Add type checking for WP.php to ensure data is an array before passing to createOrUpdateSubscriber

- Fix mock objects setup in AdminUserSubscriptionTest.php to use proper PHPUnit methods
2025-04-10 14:42:34 +02:00
Rodrigo Estebanez
050537e8fd separate concerns. Move view to the views folder 2025-04-10 14:42:34 +02:00
Rodrigo Estebanez
c28d5bbbc1 update tests. edit_user_created_user hook is no longer used 2025-04-10 14:42:34 +02:00
Rodrigo Estebanez
6d280a9336 remove doc/current_ticket.md from repo 2025-04-10 14:42:34 +02:00
Rodrigo Estebanez
28727167be Allow admins to set subscriber status when they create a new user in WP admin
it uses a filter approach
2025-04-10 14:42:34 +02:00
Jan Lysý
fcfefccdff Remove Beta and RC strings from WP version in acceptance tests 2025-04-10 09:26:26 +02:00
Jan Lysý
1b7af931ca Fix scrolling in styles sidebar for WP 6.8 2025-04-10 09:26:26 +02:00
Jan Lysý
e1881eb43d Remove unsupported property
This property should not be supported anymore in WP 6.8
2025-04-10 09:26:26 +02:00
Jan Lysý
5acd301b78 Make Email editor template mode compatible with WP 6.8 2025-04-10 09:26:26 +02:00
Jan Lysý
3d582bc339 Add cookie reset to avoid test conflicts 2025-04-10 09:26:26 +02:00
 Ján Mikláš
ce26389001 Fix lint issues
[STOMAIL-7353]
2025-04-09 11:28:16 +02:00
 Ján Mikláš
ea05bd280d Update readme.txt and changelog.txt
[STOMAIL-7353]
2025-04-09 11:28:16 +02:00
 Ján Mikláš
dd76760e5f Remove remaining mentions of Jira from the codebase
[STOMAIL-7353]
2025-04-09 11:28:16 +02:00
 Ján Mikláš
81ac6f3ada Remove no longer user JiraController
[STOMAIL-7353]
2025-04-09 11:28:16 +02:00
 Ján Mikláš
a1f6399e5d Replace fetching Jira changelog with readme.txt
[STOMAIL-7353]
2025-04-09 11:28:16 +02:00
 Ján Mikláš
51ed4de254 Remove important notes from changelog commands
[STOMAIL-7353]
2025-04-09 11:28:16 +02:00
 Ján Mikláš
c6d999ecdc Remove Jira from ReleaseVersionController
[STOMAIL-7353]
2025-04-09 11:28:16 +02:00
 Ján Mikláš
2434bac568 Replace Jira with GitHub when getting version for GitHub and Slack releases
[STOMAIL-7353]
2025-04-09 11:28:16 +02:00
 Ján Mikláš
f3d1a7f77c Unify how next version is determined between preparing and publishing the release
[STOMAIL-7353]
2025-04-09 11:28:16 +02:00
 Ján Mikláš
5c720a76be Remove Jira link from Slack notifier
[STOMAIL-7353]
2025-04-09 11:28:16 +02:00
 Ján Mikláš
76d313e531 Remove unnecessary returns
[STOMAIL-7353]
2025-04-09 11:28:16 +02:00
 Ján Mikláš
1369edd733 Skip assigning Jira tickets a fix version
[STOMAIL-7353]
2025-04-09 11:28:16 +02:00
 Ján Mikláš
7d8bc4efd8 Replace Jira with GitHub when getting the last released version
[STOMAIL-7353]
2025-04-09 11:28:16 +02:00
 Ján Mikláš
574072b567 Remove unused commands for reviews summary
[STOMAIL-7353]
2025-04-09 11:28:16 +02:00
 Ján Mikláš
5a53653cdd Remove Jira release
[STOMAIL-7353]
2025-04-09 11:28:16 +02:00
 Ján Mikláš
22553195ed Remove checking that issues have merged PRs
[STOMAIL-7353]
2025-04-09 11:28:16 +02:00
 Ján Mikláš
63a6d7ca6b Add changelog
[STOMAIL-7353]
2025-04-09 11:28:16 +02:00
 Ján Mikláš
b342b1ad58 Update PR template to work with internal links 2025-04-09 09:32:27 +02:00
 Ján Mikláš
a917e01e0e Update notice when editing active automation
STOMAIL-7382
2025-04-09 09:32:27 +02:00
Ján Mikláš
d5f600abf3 Add link to changelog entry 2025-04-08 22:29:47 +02:00
 Ján Mikláš
cc569f3388 Update tests
[MAILPOET-5846]
2025-04-08 20:45:47 +08:00
 Ján Mikláš
172028d1f9 Change severity of key check fails from error to log
[MAILPOET-5846]
2025-04-08 20:45:47 +08:00
 Ján Mikláš
4eee568908 Log failed premium key check in premium group instead of mss
[MAILPOET-5846]
2025-04-08 20:45:47 +08:00
github-actions[bot]
63a933903e Update used Automate Woo plugin in Circle CI
- latest version: 6.1.9
 - previous version: 6.0.33
2025-04-07 11:52:42 +02:00
 Ján Mikláš
d7c0ddf6a6 Set maximum PHP version to use with WordPress images
STOMAIL-7379
2025-04-07 10:47:04 +02:00
3d11c14f3c Merge tag '5.10.0'
All checks were successful
Make release / release (push) Successful in 51m7s
2025-04-06 22:38:16 -05:00
 Ján Mikláš
90b6a3774a Revert PHP version bump in tests docker 2025-04-03 16:32:18 +02:00
github-actions[bot]
ea0b1dabfb Update used WooCommerce Subscriptions plugin in Circle CI
- latest version: 7.3.1
 - previous version: 7.2.1
2025-04-03 16:32:18 +02:00
github-actions[bot]
3885f24458 Update used WordPress images in Circle CI
- latest version: 6.7.2-php8.4
 - previous version: 6.6.2
2025-04-03 16:32:18 +02:00
David Remer
e1e219c140 Add changelog checkbox
[STOMAIL-7371]
2025-03-31 12:49:43 +03:00
David Remer
eea6dfcc13 Make implicit nullables explicit
[MAILPOET-6513]
2025-03-31 10:16:21 +03:00
 Ján Mikláš
1a0b9681d6 Don't update to PHP 8.4 yet 2025-03-24 13:26:25 +01:00
github-actions[bot]
c1ec64ad66 Update used WooCommerce Subscriptions plugin in Circle CI
- latest version: 7.3.0
 - previous version: 7.2.1
2025-03-24 13:26:25 +01:00
github-actions[bot]
95a55a63e1 Update used Automate Woo plugin in Circle CI
- latest version: 6.1.8
 - previous version: 6.0.33
2025-03-24 13:26:25 +01:00
github-actions[bot]
de83e66d1c Update used WordPress images in Circle CI
- latest version: 6.7.2-php8.4
 - previous version: 6.6.2
2025-03-24 13:26:25 +01:00
 Ján Mikláš
4105391148 Include .gitleaksignore in .zip
[MAILPOET-6489]
2025-03-22 10:25:02 +02:00
 Ján Mikláš
cf56e8ef71 Add .gitleaksignore to ignore false positives
[MAILPOET-6489]
2025-03-22 10:25:02 +02:00
 Ján Mikláš
0e39869942 Fix PHP compatibility issues in 3rd-party libs
[MAILPOET-6489]
2025-03-22 10:25:02 +02:00
 Ján Mikláš
37397017df Fix compatibility with PHP 7.4 which doesn't support single argument in array_intersect
[MAILPOET-6489]
2025-03-22 10:25:02 +02:00
Pavel Dohnal
c4965bc887 Release 5.10.0 2025-03-18 12:32:06 +01:00
 Ján Mikláš
7d8a1528a4 Clarify support CTA for free users
[MAILPOET-6504
2025-03-18 12:45:35 +03:00
 Ján Mikláš
6b6a44244b Simplify different support links in DocsBot
[MAILPOET-6504
2025-03-18 12:45:35 +03:00
Pavel Dohnal
7bfb8c86fa Release 5.10.0
Some checks failed
Email Editor Package Tests / code-style (push) Waiting to run
Email Editor Package Tests / phpstan-static-analysis (7.4) (push) Waiting to run
Email Editor Package Tests / phpstan-static-analysis (8.2) (push) Waiting to run
Email Editor Package Tests / build (8.2) (push) Has been cancelled
Email Editor Package Tests / build (7.4) (push) Has been cancelled
2025-03-18 07:28:29 +01:00
Rostislav Wolny
c288b1d886 Add override to enforce fixed @babel packages
[MAILPOET-6503]
2025-03-18 00:12:32 +03:00
alex-mpoet
40e2d5c0b3 Add getPermalink to automation WP functions
[MAILPOET-6477]
2025-03-17 15:16:26 +01:00
alex-mpoet
4729f13871 Cache comment in comment payload for subsequent calls
[MAILPOET-6477]
2025-03-17 15:16:26 +01:00
Rostislav Wolny
2024789914 Update usage of download Woo Memberships after removing support for version
[MAILPOET-6502]
2025-03-15 10:18:47 +01:00
Rostislav Wolny
68341a949b Update dowload woocommerce-membership.zip to always grab the latest version
[MAILPOET-6502]
2025-03-15 10:18:47 +01:00
Rostislav Wolny
4434efdb8d Temporarily skip WooCommerce Membership tests for wp 6.8+
[MAILPOET-6501]
2025-03-13 17:27:21 +01:00
Rostislav Wolny
f59b98eb88 Refactor installation of specific WP version in test env
This commit changes how we install a specific WP version when required
for tests via the WORDPRESS_VERSION env variable.
In the previous approach, we installed the original version from the image
and then updated to the required version. We had some issues as after the
update, there might be some leftover background tasks, etc. that may
interfere with the tests.
In the new approach, we download the required version
prior to the installation.
[MAILPOET-6501]
2025-03-13 17:27:21 +01:00
dependabot[bot]
4b4ed2814c Bump @babel/runtime-corejs3 from 7.24.7 to 7.26.10
Bumps [@babel/runtime-corejs3](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime-corejs3) from 7.24.7 to 7.26.10.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.26.10/packages/babel-runtime-corejs3)

---
updated-dependencies:
- dependency-name: "@babel/runtime-corejs3"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-13 14:06:49 +01:00
dependabot[bot]
51bd48abd3 Bump @babel/runtime from 7.24.7 to 7.26.10
Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.24.7 to 7.26.10.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.26.10/packages/babel-runtime)

---
updated-dependencies:
- dependency-name: "@babel/runtime"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-13 10:08:54 +01:00
dependabot[bot]
f4a614e2cc Bump prismjs from 1.29.0 to 1.30.0
Bumps [prismjs](https://github.com/PrismJS/prism) from 1.29.0 to 1.30.0.
- [Release notes](https://github.com/PrismJS/prism/releases)
- [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PrismJS/prism/compare/v1.29.0...v1.30.0)

---
updated-dependencies:
- dependency-name: prismjs
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-13 09:21:35 +01:00
Rodrigo Estebanez
15c520a603 Add woocommerce:order:created-via field 2025-03-13 09:21:54 +02:00
alex-mpoet
623db5f9d3 Fix previewing of automation template emails
[MAILPOET-6478]
2025-03-12 16:51:58 +01:00
alex-mpoet
2a00b6da65 Set automation ID to emails on automation editor load
[MAILPOET-6478]
2025-03-12 16:51:58 +01:00
alex-mpoet
016c51fb9b Initialize email template directory later, not in constructor
[MAILPOET-6478]
2025-03-12 16:51:58 +01:00
alex-mpoet
a4adc5aca0 Improve error handlng in automation email factory template loading
[MAILPOET-6478]
2025-03-12 16:51:58 +01:00
alex-mpoet
bfdae66c02 Add flag to automation template preview request
[MAILPOET-6478]
2025-03-12 16:51:58 +01:00
alex-mpoet
86b63917ef Fix phpstan errors
[MAILPOET-6478]
2025-03-12 16:51:58 +01:00
alex-mpoet
465b3a33a7 Add tests for email factory
[MAILPOET-6478]
2025-03-12 16:51:58 +01:00
alex-mpoet
0fc9861f47 Inject email factory into automation templates factory
[MAILPOET-6478]
2025-03-12 16:51:58 +01:00
alex-mpoet
b08d49ba5e Add factory for creating automation emails from templates
[MAILPOET-6478]
2025-03-12 16:51:58 +01:00
Jan Lysý
e4040bdfb4 Update Xdebug to version 3.4.2 in PHP 8.2 and PHP 8.3 Dockerfiles
[MAILPOET-6297]
2025-03-12 07:51:03 +01:00
Jan Lysý
0b1ba9e64b Use PHP 8.3 for local development
[MAILPOET-6297]
2025-03-12 07:51:03 +01:00
Jan Lysý
e0ce65f4d9 Remove testing-related configurations and references
Remove WordPress test container, test database script, and related dashboard links

[MAILPOET-6297]
2025-03-12 07:51:03 +01:00
Jan Lysý
f612c441f8 Update PHP version for Circle CI
[MAILPOET-6297]
2025-03-12 07:51:03 +01:00
Jan Lysý
5ba7cdef29 Test static analysis against PHP 8.3
[MAILPOET-6297]
2025-03-12 07:51:03 +01:00
Jan Lysý
59a282c497 Use PHP 8.3 CLI images in tests
[MAILPOET-6297]
2025-03-12 07:51:03 +01:00
Jan Lysý
5e47337913 Add PHP 8.3 fixes for Codeception in tests env
[MAILPOET-6297]
2025-03-12 07:51:03 +01:00
Jan Lysý
483e4db123 Remove testing container
Because this container is not used anymore we can remove it.
[MAILPOET-6297]
2025-03-12 07:51:03 +01:00
Jan Lysý
1ac3cd6559 Add PHP 8.3 Dockerfile for local development
[MAILPOET-6297]
2025-03-12 07:51:03 +01:00
d0943e9e54 Merge tag '5.9.0'
All checks were successful
Make release / release (push) Successful in 57m3s
2025-03-11 14:51:49 -05:00
Rostislav Wolny
110da29d35 Allow override MAILPOET_TRACY_LOG_DIR in tests
We need to set a different directory for premium tests
[PREMIUM-293]
2025-03-11 16:30:20 +01:00
Rostislav Wolny
ba3f072928 Release 5.9.0 2025-03-11 15:37:01 +01:00
Rostislav Wolny
05e9959beb Release 5.9.0
Some checks failed
Email Editor Package Tests / build (7.4) (push) Has been cancelled
Email Editor Package Tests / build (8.2) (push) Has been cancelled
Email Editor Package Tests / code-style (push) Has been cancelled
Email Editor Package Tests / phpstan-static-analysis (7.4) (push) Has been cancelled
Email Editor Package Tests / phpstan-static-analysis (8.2) (push) Has been cancelled
2025-03-11 08:21:30 +01:00
David Remer
fcfdb6ad2a Escape late in Captcha form
[MAILPOET-6489]
2025-03-10 17:45:37 +01:00
David Remer
30e42fa7b6 MAKE html encoding cross-version compatible
[MAILPOET-6489]
2025-03-10 17:45:37 +01:00
Jan Lysý
36b667c371 Use WooCommerce RC versions in nightly_qit job
[MAILPOET-6498]
2025-03-10 17:09:03 +01:00
github-actions[bot]
74e1616e15 Update used WooCommerce plugin in Circle CI
- latest version: 9.7.1
 - previous version: 9.6.2
2025-03-10 11:06:48 +01:00
b29f04d515 Revert "Reset build script to original"
All checks were successful
Make release / release (push) Successful in 51m21s
This reverts commit 9c2aca9c52.
2025-03-09 09:09:34 -05:00
6978be8586 ca certs in build file
All checks were successful
Make release / release (push) Successful in 50m38s
2025-03-09 06:36:35 -05:00
20b0630b90 dont use frozen install
Some checks failed
Make release / release (push) Failing after 3h2m58s
2025-03-05 03:47:23 -06:00
9c2aca9c52 Reset build script to original
Some checks failed
Make release / release (push) Has been cancelled
2025-03-05 01:53:35 -06:00
749f4dea4f Merge tag '5.8.1' 2025-03-05 01:51:34 -06:00
Jan Lysý
6a4919fbc1 Release 5.8.1
Some checks failed
Email Editor Package Tests / code-style (push) Has been cancelled
Email Editor Package Tests / phpstan-static-analysis (7.4) (push) Has been cancelled
Email Editor Package Tests / phpstan-static-analysis (8.2) (push) Has been cancelled
Email Editor Package Tests / build (7.4) (push) Has been cancelled
Email Editor Package Tests / build (8.2) (push) Failing after 25m38s
2025-03-03 13:27:10 +01:00
8fc987f29e Merge remote-tracking branch 'upstream/trunk'
Some checks failed
Make release / release (push) Failing after 3h2m1s
2025-02-28 03:42:42 -06:00
33e1b4baee Revert "let the build script update the lock file"
This reverts commit 8e6ecf8b17.
2025-02-28 03:41:20 -06:00
8e6ecf8b17 let the build script update the lock file
Some checks failed
Make release / release (push) Failing after 3h2m32s
fixes  "ERROR  Cannot proceed with the frozen installation. The current "overrides" configuration doesnt match the value found in the lockfile" ideally
2025-02-28 02:31:17 -06:00
cc6ad57f89 Merge tag '5.8.0'
Some checks failed
Make release / release (push) Failing after 3h12m40s
2025-02-26 13:12:54 -06:00
 Ján Mikláš
243dcfd6cc Release 5.8.0
Some checks failed
Email Editor Package Tests / build (7.4) (push) Failing after 28m3s
Email Editor Package Tests / build (8.2) (push) Failing after 26m49s
Email Editor Package Tests / code-style (push) Successful in 3m55s
Email Editor Package Tests / phpstan-static-analysis (7.4) (push) Successful in 44m21s
Email Editor Package Tests / phpstan-static-analysis (8.2) (push) Successful in 45m39s
2025-02-24 20:55:43 +01:00
github-actions[bot]
3385bd91f6 Update used WooCommerce Subscriptions plugin in Circle CI
- latest version: 7.2.1
 - previous version: 7.1.0
2025-02-20 01:32:02 -06:00
github-actions[bot]
1bb1160cc8 Update used Automate Woo plugin in Circle CI
- latest version: 6.1.6
 - previous version: 6.0.33
2025-02-20 01:32:02 -06:00
github-actions[bot]
a259d54fe9 Update used WooCommerce plugin in Circle CI
- latest version: 9.6.2
 - previous version: 9.5.2
2025-02-20 01:32:02 -06:00
github-actions[bot]
4fd8387466 Update used WordPress images in Circle CI
- latest version: 6.7.2-php8.3
 - previous version: 6.6.2
2025-02-20 01:32:02 -06:00
alex-mpoet
3faa86fbf9 Release 5.7.1 2025-02-20 01:32:02 -06:00
David Remer
3b56725e5d Upgrade Action Scheduler to 3.9.2
[MAILPOET-6467]
2025-02-20 01:32:02 -06:00
 Ján Mikláš
cd04fbf00d Properly set block opt-in checkbox label to render with correct classes
This fixes verical misalignment between the checkbox and the label

[MAILPOET-6436]
2025-02-20 01:32:02 -06:00
 Ján Mikláš
ed581efa62 Update CheckboxControl types
6b8a403a03/plugins/woocommerce-blocks/packages/components/checkbox-control/index.tsx (L12-L21)

[MAILPOET-6436]
2025-02-20 01:32:02 -06:00
68425396d5 we always return false for subscriber checks
All checks were successful
Make release / release (push) Successful in 11m39s
2025-02-14 23:25:50 -06:00
0b1eb4bea3 change subscriber limit at the source 2025-02-14 23:07:20 -06:00
6d017c9298 add more memory to node js so it doesnt brap out
All checks were successful
Make release / release (push) Successful in 56m59s
2025-02-14 19:17:12 -06:00
fe6d4603a2 verifying that pnpm is installed
All checks were successful
Make release / release (push) Successful in 43m35s
2025-02-14 07:04:25 -06:00
7959333fb1 further converge release.yml
All checks were successful
Make release / release (push) Successful in 30m17s
2025-02-14 04:17:41 -06:00
1cea4342f7 Revert "npx update-browserslist-db@latest because the build is frozen without it"
This reverts commit a5fb8b8171.
2025-02-14 04:16:34 -06:00
a5fb8b8171 npx update-browserslist-db@latest because the build is frozen without it
Some checks failed
Make release / release (push) Failing after 6m2s
2025-02-14 04:06:12 -06:00
22eb47d8bc simplify build 2025-02-14 03:48:25 -06:00
6fe58a2445 merge upstream 2025-02-14 09:37:47 +00:00
f5a4a300af make sure env files are set up
Some checks failed
Make release / release (push) Failing after 8m28s
2025-02-14 03:35:06 -06:00
d2723938aa keep development bloat to prevent crash
All checks were successful
Make release / release (push) Successful in 21m15s
2025-02-14 02:31:57 -06:00
25262cff80 remove redundant zipping
All checks were successful
Make release / release (push) Successful in 6m56s
2025-02-13 20:16:29 -06:00
c31795cd4d Unfuck the generated release
All checks were successful
Make release / release (push) Successful in 32m25s
It was grabbing a whole lot of extra junk and didn't put it in the proper format for a wordpress plugin, this should fix it.
2025-02-13 18:47:56 -06:00
73d410eb86 Add Release Smith Support
All checks were successful
Make release / release (push) Successful in 16m16s
2025-02-13 13:31:40 -06:00
b8a25410d4 make sure golang is installed 2025-02-13 13:31:40 -06:00
85e067e7dc merge upstream 2025-02-13 19:27:13 +00:00
4afd82778a remove upstream tests
Some checks failed
Make release / release (push) Failing after 35m7s
2025-02-13 03:40:55 -06:00
84c95293e0 use gitea release-actions
Some checks failed
Email Editor Package Tests / build (7.4) (push) Has been cancelled
Email Editor Package Tests / build (8.2) (push) Has been cancelled
Email Editor Package Tests / code-style (push) Has been cancelled
Email Editor Package Tests / phpstan-static-analysis (7.4) (push) Has been cancelled
Email Editor Package Tests / phpstan-static-analysis (8.2) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Make release / release (push) Failing after 13m1s
2025-02-13 03:35:23 -06:00
8024708c1d all tags cause the thing to build
Some checks failed
CodeQL / Analyze (javascript) (push) Waiting to run
Email Editor Package Tests / build (7.4) (push) Has been cancelled
Email Editor Package Tests / build (8.2) (push) Has been cancelled
Email Editor Package Tests / code-style (push) Has been cancelled
Email Editor Package Tests / phpstan-static-analysis (7.4) (push) Has been cancelled
Email Editor Package Tests / phpstan-static-analysis (8.2) (push) Has been cancelled
2025-02-13 03:06:53 -06:00
95a750365b remove test Run email-editor package integration tests
Some checks failed
CodeQL / Analyze (javascript) (push) Has been cancelled
Email Editor Package Tests / code-style (push) Has been cancelled
Email Editor Package Tests / phpstan-static-analysis (7.4) (push) Has been cancelled
Email Editor Package Tests / phpstan-static-analysis (8.2) (push) Has been cancelled
Email Editor Package Tests / build (7.4) (push) Has been cancelled
Email Editor Package Tests / build (8.2) (push) Has been cancelled
2025-02-13 03:03:22 -06:00
2cee607749 add release building action
Some checks failed
CodeQL / Analyze (javascript) (push) Failing after 14m6s
Email Editor Package Tests / build (7.4) (push) Failing after 28m12s
Email Editor Package Tests / code-style (push) Successful in 6m48s
Email Editor Package Tests / build (8.2) (push) Failing after 27m41s
Email Editor Package Tests / phpstan-static-analysis (7.4) (push) Successful in 50m0s
Email Editor Package Tests / phpstan-static-analysis (8.2) (push) Successful in 45m35s
2025-02-12 23:27:20 -06:00
9c9193eeed Revert "add woodpecker for auto-building + releases"
Some checks failed
CodeQL / Analyze (javascript) (push) Failing after 10m17s
Email Editor Package Tests / build (8.2) (push) Failing after 31m17s
Email Editor Package Tests / code-style (push) Successful in 4m14s
Email Editor Package Tests / phpstan-static-analysis (7.4) (push) Successful in 45m11s
Email Editor Package Tests / build (7.4) (push) Failing after 2h2m50s
Email Editor Package Tests / phpstan-static-analysis (8.2) (push) Successful in 44m49s
This reverts commit 10c82b687d.
2025-02-12 19:43:11 -06:00
10c82b687d add woodpecker for auto-building + releases
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
2025-02-12 18:26:32 -06:00
00c9bf3dcd Fuck you Baltimore, you can kiss my ass.
Upped the Free subscriber limit from 1000 to 999999999 or some shit.
2025-02-12 17:55:15 -06:00
1223 changed files with 13323 additions and 5105 deletions

View File

@@ -1,13 +1,13 @@
#!/bin/bash
# Fetch the versions of WooCommerce from the WordPress API
VERSIONS=$(curl -s https://api.wordpress.org/plugins/info/1.0/woocommerce.json | jq -r '.versions | keys_unsorted | .[]' | grep -v 'trunk')
LATEST_VERSION=""
# Find the latest version
for version in $VERSIONS; do
LATEST_VERSION=$version
done
LATEST_VERSION=$(
curl -s https://api.wordpress.org/plugins/info/1.0/woocommerce.json | \
jq -r '.versions | keys_unsorted | .[]' | \
grep -v 'trunk' | \
sort -V | \
tail -n 1
)
# Check if the latest version is a beta/RC version
if [[ $LATEST_VERSION != *'beta'* && $LATEST_VERSION != *'rc'* ]]; then

View File

@@ -104,7 +104,7 @@ executors:
wpcli_php_latest:
<<: *default_job_config
docker:
- image: mailpoet/wordpress:8.2_20241126.1
- image: mailpoet/wordpress:8.3_20250305.1
wpcli_php_mysql_oldest:
<<: *default_job_config
@@ -115,7 +115,7 @@ executors:
wpcli_php_mysql_latest:
<<: *default_job_config
docker:
- image: mailpoet/wordpress:8.2_20241126.1
- image: mailpoet/wordpress:8.3_20250305.1
- image: cimg/mysql:8.0
command: --default-authentication-plugin=mysql_native_password --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_520_ci
@@ -197,10 +197,10 @@ jobs:
- run:
name: Download additional WP Plugins for tests
command: |
./do download:woo-commerce-zip 9.7.0
./do download:woo-commerce-subscriptions-zip 7.2.1
./do download:woo-commerce-memberships-zip 1.26.5
./do download:automate-woo-zip 6.1.7
./do download:woo-commerce-zip 10.0.4
./do download:woo-commerce-subscriptions-zip 7.7.0
./do download:woo-commerce-memberships-zip
./do download:automate-woo-zip 6.1.15
- run:
name: Dump tests ENV variables for acceptance tests
command: |
@@ -378,9 +378,6 @@ jobs:
woo_subscriptions_version:
type: string
default: ''
woo_memberships_version:
type: string
default: ''
automate_woo_version:
type: string
default: ''
@@ -471,7 +468,7 @@ jobs:
name: Download WooCommerce Core
command: |
cd ../tests_env/docker
docker compose run --rm -w /project --entrypoint "./do download:woo-commerce-zip ${WOOCOMMERCE_VERSION}" --no-deps -e WP_GITHUB_USERNAME=${WP_GITHUB_USERNAME} -e WP_GITHUB_TOKEN=${WP_GITHUB_TOKEN} codeception_acceptance
docker compose run --rm -w /project --entrypoint "./do download:woo-commerce-zip ${WOOCOMMERCE_VERSION}" --no-deps -e WP_GITHUB_USERNAME=${WP_GITHUB_USERNAME} -e WP_GITHUB_WOOCOMMERCE_TOKEN=${WP_GITHUB_WOOCOMMERCE_TOKEN} codeception_acceptance
- when:
condition: << parameters.woo_subscriptions_version >>
steps:
@@ -479,15 +476,7 @@ jobs:
name: Download WooCommerce Subscriptions
command: |
cd ../tests_env/docker
docker compose run --rm -w /project --entrypoint "./do download:woo-commerce-subscriptions-zip << parameters.woo_subscriptions_version >>" --no-deps -e WP_GITHUB_USERNAME=${WP_GITHUB_USERNAME} -e WP_GITHUB_TOKEN=${WP_GITHUB_TOKEN} codeception_acceptance
- when:
condition: << parameters.woo_memberships_version >>
steps:
- run:
name: Download WooCommerce Memberships
command: |
cd ../tests_env/docker
docker compose run --rm -w /project --entrypoint "./do download:woo-commerce-memberships-zip << parameters.woo_memberships_version >>" --no-deps -e WP_GITHUB_USERNAME=${WP_GITHUB_USERNAME} -e WP_GITHUB_TOKEN=${WP_GITHUB_TOKEN} codeception_acceptance
docker compose run --rm -w /project --entrypoint "./do download:woo-commerce-subscriptions-zip << parameters.woo_subscriptions_version >>" --no-deps -e WP_GITHUB_USERNAME=${WP_GITHUB_USERNAME} -e WP_GITHUB_WOOCOMMERCE_TOKEN=${WP_GITHUB_WOOCOMMERCE_TOKEN} codeception_acceptance
- when:
condition: << parameters.automate_woo_version >>
steps:
@@ -495,7 +484,7 @@ jobs:
name: Download AutomateWoo
command: |
cd ../tests_env/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
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_WOOCOMMERCE_TOKEN=${WP_GITHUB_WOOCOMMERCE_TOKEN} codeception_acceptance
- run:
name: Group acceptance tests
command: |
@@ -695,9 +684,6 @@ jobs:
woo_subscriptions_version:
type: string
default: ''
woo_memberships_version:
type: string
default: ''
automate_woo_version:
type: string
default: ''
@@ -767,7 +753,7 @@ jobs:
name: Download WooCommerce Core
command: |
cd ../tests_env/docker
docker compose run --rm -w /project --entrypoint "./do download:woo-commerce-zip ${WOOCOMMERCE_VERSION}" --no-deps -e WP_GITHUB_USERNAME=${WP_GITHUB_USERNAME} -e WP_GITHUB_TOKEN=${WP_GITHUB_TOKEN} codeception_integration
docker compose run --rm -w /project --entrypoint "./do download:woo-commerce-zip ${WOOCOMMERCE_VERSION}" --no-deps -e WP_GITHUB_USERNAME=${WP_GITHUB_USERNAME} -e WP_GITHUB_WOOCOMMERCE_TOKEN=${WP_GITHUB_WOOCOMMERCE_TOKEN} codeception_integration
- when:
condition: << parameters.woo_subscriptions_version >>
steps:
@@ -775,15 +761,7 @@ jobs:
name: Download WooCommerce Subscriptions
command: |
cd ../tests_env/docker
docker compose run --rm -w /project --entrypoint "./do download:woo-commerce-subscriptions-zip << parameters.woo_subscriptions_version >>" --no-deps -e WP_GITHUB_USERNAME=${WP_GITHUB_USERNAME} -e WP_GITHUB_TOKEN=${WP_GITHUB_TOKEN} codeception_integration
- when:
condition: << parameters.woo_memberships_version >>
steps:
- run:
name: Download WooCommerce Memberships
command: |
cd ../tests_env/docker
docker compose run --rm -w /project --entrypoint "./do download:woo-commerce-memberships-zip << parameters.woo_memberships_version >>" --no-deps -e WP_GITHUB_USERNAME=${WP_GITHUB_USERNAME} -e WP_GITHUB_TOKEN=${WP_GITHUB_TOKEN} codeception_integration
docker compose run --rm -w /project --entrypoint "./do download:woo-commerce-subscriptions-zip << parameters.woo_subscriptions_version >>" --no-deps -e WP_GITHUB_USERNAME=${WP_GITHUB_USERNAME} -e WP_GITHUB_WOOCOMMERCE_TOKEN=${WP_GITHUB_WOOCOMMERCE_TOKEN} codeception_integration
- when:
condition: << parameters.automate_woo_version >>
steps:
@@ -791,7 +769,7 @@ jobs:
name: Download AutomateWoo
command: |
cd ../tests_env/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_integration
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_WOOCOMMERCE_TOKEN=${WP_GITHUB_WOOCOMMERCE_TOKEN} codeception_integration
- run:
name: 'PHP Integration tests'
command: |
@@ -949,14 +927,8 @@ jobs:
- run:
name: 'QIT Activation Tests'
command: |
LATEST_WC_BETA=$(../.circleci/check_woocommerce_beta.sh | grep 'LATEST_BETA' | cut -d'=' -f2)
if [ -z "$LATEST_WC_BETA" ]; then
echo "No WooCommerce Beta version found. Using stable."
./do qa:qit-activation | tee tests/_output/qit-activation
else
echo "Using WooCommerce Beta Version: $LATEST_WC_BETA"
./do qa:qit-activation --wc=$LATEST_WC_BETA | tee tests/_output/qit-activation
fi
echo "Using WooCommerce RC Version"
./do qa:qit-activation --wc=rc | tee tests/_output/qit-activation
- run:
name: 'Retrieve test results'
command: |
@@ -980,14 +952,8 @@ jobs:
- run:
name: 'QIT Woo API Tests'
command: |
LATEST_WC_BETA=$(../.circleci/check_woocommerce_beta.sh | grep 'LATEST_BETA' | cut -d'=' -f2)
if [ -z "$LATEST_WC_BETA" ]; then
echo "No WooCommerce Beta version found. Using stable."
./do qa:qit-woo-api | tee tests/_output/qit-woo-api
else
echo "Using WooCommerce Beta Version: $LATEST_WC_BETA"
./do qa:qit-woo-api --wc=$LATEST_WC_BETA | tee tests/_output/qit-woo-api
fi
echo "Using WooCommerce RC Version"
./do qa:qit-woo-api --wc=rc | tee tests/_output/qit-woo-api
- run:
name: 'Retrieve test results'
command: |
@@ -1012,14 +978,8 @@ jobs:
name: 'QIT Woo E2E Tests'
no_output_timeout: 1h # Woo E2E tests usually takes ~45m
command: |
LATEST_WC_BETA=$(../.circleci/check_woocommerce_beta.sh | grep 'LATEST_BETA' | cut -d'=' -f2)
if [ -z "$LATEST_WC_BETA" ]; then
echo "No WooCommerce Beta version found. Using stable."
./do qa:qit-woo-e2e | tee tests/_output/qit-woo-e2e
else
echo "Using WooCommerce Beta Version: $LATEST_WC_BETA"
./do qa:qit-woo-e2e --wc=$LATEST_WC_BETA | tee tests/_output/qit-woo-e2e
fi
echo "Using WooCommerce RC Version"
./do qa:qit-woo-e2e --wc=rc | tee tests/_output/qit-woo-e2e
- run:
name: 'Retrieve test results'
command: |
@@ -1052,7 +1012,7 @@ workflows:
- static_analysis:
<<: *slack-fail-post-step
name: static_analysis_php8
php_version: 80200
php_version: 80300
requires:
- build
- security_analysis:
@@ -1222,15 +1182,14 @@ workflows:
- acceptance_tests:
<<: *slack-fail-post-step
name: acceptance_oldest
woo_core_version: 9.6.2
woo_subscriptions_version: 7.1.0
woo_memberships_version: 1.25.2
woo_core_version: 9.9.5
woo_subscriptions_version: 7.6.0
automate_woo_version: 6.0.33
mysql_command: --max_allowed_packet=100M
mysql_image: mysql:5.5
mysql_image: mysql:5.6
codeception_image_version: 7.4-cli_20220605.0
wordpress_image_version: 6.1.1-php7.4 # We use image with PHP 7.4 and install required WordPress version via CLI
wordpress_version: 6.6.2
wordpress_version: 6.7.2
requires:
- build
- performance_tests:
@@ -1263,15 +1222,14 @@ workflows:
- integration_tests:
<<: *slack-fail-post-step
name: integration_oldest
woo_core_version: 9.6.2
woo_subscriptions_version: 7.1.0
woo_memberships_version: 1.25.2
woo_core_version: 9.9.5
woo_subscriptions_version: 7.6.0
automate_woo_version: 6.0.33
codeception_image_version: 7.4-cli_20220605.0
wordpress_image_version: 6.1.1-php7.4 # We use image with PHP 7.4 and install required WordPress version via CLI # We use image with PHP 7.4 and install required WordPress version via CLI
wordpress_version: 6.6.2
wordpress_version: 6.7.2
mysql_command: --max_allowed_packet=100M
mysql_image: mysql:5.5
mysql_image: mysql:5.6
requires:
- build
- build_premium:
@@ -1326,27 +1284,25 @@ workflows:
- acceptance_tests:
<<: *slack-fail-post-step
name: acceptance_with_premium_oldest
woo_core_version: 9.6.2
woo_subscriptions_version: 7.1.0
woo_memberships_version: 1.25.2
woo_core_version: 9.9.5
woo_subscriptions_version: 7.6.0
automate_woo_version: 6.0.33
codeception_image_version: 7.4-cli_20220605.0
wordpress_image_version: 6.1.1-php7.4 # We use image with PHP 7.4 and install required WordPress version via CLI
wordpress_version: 6.6.2
wordpress_version: 6.7.2
requires:
- build_premium
- integration_tests:
<<: *slack-fail-post-step
name: integration_with_premium_oldest
woo_core_version: 9.6.2
woo_subscriptions_version: 7.1.0
woo_memberships_version: 1.25.2
woo_core_version: 9.9.5
woo_subscriptions_version: 7.6.0
automate_woo_version: 6.0.33
codeception_image_version: 7.4-cli_20220605.0
wordpress_image_version: 6.1.1-php7.4 # We use image with PHP 7.4 and install required WordPress version via CLI
wordpress_version: 6.6.2
wordpress_version: 6.7.2
mysql_command: --max_allowed_packet=100M
mysql_image: mysql:5.5
mysql_image: mysql:5.6
requires:
- build_premium

View File

@@ -24,6 +24,7 @@ _N/A_
## Tasks
- [ ] I have added a changelog entry (`./do changelog:add --type=<type> --description=<description>`)
- [ ] I followed [best practices](https://codex.wordpress.org/I18n_for_WordPress_Developers) for translations
- [ ] I added sufficient test coverage
- [ ] I embraced TypeScript by either creating new files in TypeScript or converting existing JavaScript files when making changes

View File

@@ -1,71 +0,0 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
name: 'CodeQL'
on:
push:
branches: [trunk]
pull_request:
# The branches below must be a subset of the branches above
branches: [trunk]
schedule:
- cron: '0 17 * * 4'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['javascript']
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

View File

@@ -1,212 +0,0 @@
name: Email Editor Package Tests
on:
push:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['7.4', '8.2']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Cache Composer vendor dependencies for MailPoet
id: composer-mailpoet-cache
uses: actions/cache@v4
with:
path: mailpoet/vendor
key: ${{ runner.os }}-composer-mailpoet-${{ matrix.php-version }}-${{ hashFiles('mailpoet/composer.lock') }}-${{ hashFiles('mailpoet/composer.json') }}
- name: Cache Composer vendor-prefixed dependencies for MailPoet
id: vendor-prefixed-cache
uses: actions/cache@v4
with:
path: mailpoet/vendor-prefixed
key: ${{ runner.os }}-vendor-prefixed-${{ matrix.php-version }}-${{ hashFiles('mailpoet/prefixer/composer.lock') }}-${{ hashFiles('mailpoet/prefixer/composer.json') }}
- name: Cache Composer vendor for test environment
id: composer-tests-env-cache
uses: actions/cache@v4
with:
path: tests_env/vendor
key: ${{ runner.os }}-composer-mailpoet-${{ matrix.php-version }}-${{ hashFiles('tests_env/composer.lock') }}-${{ hashFiles('tests_env/composer.json') }}
- name: Cache Composer dependencies for Email Editor
id: composer-email-editor-cache
uses: actions/cache@v4
with:
path: packages/php/email-editor/vendor
key: ${{ runner.os }}-composer-email-editor-${{ matrix.php-version }}-${{ hashFiles('packages/php/email-editor/composer.lock') }}-${{ hashFiles('packages/php/email-editor/composer.json') }}
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: gd
- name: Install tools
run: |
COMPOSER_DEV_MODE=1 php tools/install.php
touch .env
working-directory: mailpoet
# Install Test Environment dependencies only if the cache was not hit
- name: Install test environment dependencies
if: steps.composer-tests-env-cache.outputs.cache-hit != 'true'
run: ../mailpoet/tools/vendor/composer.phar install
working-directory: tests_env
# Install MailPoet dependencies only if the cache was not hit
- name: Install mailpoet dependencies
if: |
steps.composer-mailpoet-cache.outputs.cache-hit != 'true' || steps.vendor-prefixed-cache.outputs.cache-hit != 'true'
run: ./tools/vendor/composer.phar install
working-directory: mailpoet
# Install Email Editor dependencies only if the cache was not hit
- name: Install email-editor dependencies
if: steps.composer-email-editor-cache.outputs.cache-hit != 'true'
run: ../../../mailpoet/tools/vendor/composer.phar install
working-directory: packages/php/email-editor
# Dump Email Editor autoload
# This is needed to refresh classmap autoload when the composer cache is hit
- name: Dump email-editor autoload
run: ../../../mailpoet/tools/vendor/composer.phar dump-autoload
working-directory: packages/php/email-editor
# Dump MailPoet autoload
# This is needed to refresh classmap autoload when the composer cache is hit
- name: Dump MailPoet autoload
run: ./tools/vendor/composer.phar dump-autoload
working-directory: mailpoet
# Run Email Editor unit tests
- name: Run email-editor package unit tests
run: ../../../tests_env/vendor/bin/codecept build && ../../../mailpoet/tools/vendor/composer.phar unit-test
working-directory: packages/php/email-editor
- name: Run email-editor package integration tests
run: ../../../mailpoet/tools/vendor/composer.phar integration-test
working-directory: packages/php/email-editor
code-style:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
- name: Install tools
run: |
COMPOSER_DEV_MODE=1 php tools/install.php
touch .env
working-directory: mailpoet
- name: Install composer dependencies
run: ../../tools/vendor/composer.phar install
working-directory: mailpoet/tasks/code_sniffer
- name: Run code style check
run: ../../../mailpoet/tools/vendor/composer.phar code-style
working-directory: packages/php/email-editor
phpstan-static-analysis:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['7.4', '8.2']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Cache Composer vendor dependencies for MailPoet
id: composer-mailpoet-cache
uses: actions/cache@v4
with:
path: mailpoet/vendor
key: ${{ runner.os }}-composer-mailpoet-${{ matrix.php-version }}-${{ hashFiles('mailpoet/composer.lock') }}-${{ hashFiles('mailpoet/composer.json') }}
- name: Cache Composer vendor-prefixed dependencies for MailPoet
id: vendor-prefixed-cache
uses: actions/cache@v4
with:
path: mailpoet/vendor-prefixed
key: ${{ runner.os }}-vendor-prefixed-${{ matrix.php-version }}-${{ hashFiles('mailpoet/prefixer/composer.lock') }}-${{ hashFiles('mailpoet/prefixer/composer.json') }}
- name: Cache Composer vendor for test environment
id: composer-tests-env-cache
uses: actions/cache@v4
with:
path: tests_env/vendor
key: ${{ runner.os }}-composer-mailpoet-${{ matrix.php-version }}-${{ hashFiles('tests_env/composer.lock') }}-${{ hashFiles('tests_env/composer.json') }}
- name: Cache Composer dependencies for Email Editor
id: composer-email-editor-cache
uses: actions/cache@v4
with:
path: packages/php/email-editor/vendor
key: ${{ runner.os }}-composer-email-editor-${{ matrix.php-version }}-${{ hashFiles('packages/php/email-editor/composer.lock') }}-${{ hashFiles('packages/php/email-editor/composer.json') }}
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: gd
- name: Install tools
run: |
COMPOSER_DEV_MODE=1 php tools/install.php
touch .env
working-directory: mailpoet
# Install Test Environment dependencies only if the cache was not hit
- name: Install test environment dependencies
if: steps.composer-tests-env-cache.outputs.cache-hit != 'true'
run: ../mailpoet/tools/vendor/composer.phar install
working-directory: tests_env
# Install MailPoet dependencies only if the cache was not hit
- name: Install mailpoet dependencies
if: |
steps.composer-mailpoet-cache.outputs.cache-hit != 'true' || steps.vendor-prefixed-cache.outputs.cache-hit != 'true'
run: ./tools/vendor/composer.phar install
working-directory: mailpoet
# Install Email Editor dependencies only if the cache was not hit
- name: Install email-editor dependencies
if: steps.composer-email-editor-cache.outputs.cache-hit != 'true'
run: ../../../mailpoet/tools/vendor/composer.phar install
working-directory: packages/php/email-editor
- name: Install composer dependencies
run: ../../tools/vendor/composer.phar install
working-directory: mailpoet/tasks/phpstan
# Dump Email Editor autoload
# This is needed to refresh classmap autoload when the composer cache is hit
- name: Dump email-editor autoload
run: ../../../mailpoet/tools/vendor/composer.phar dump-autoload
working-directory: packages/php/email-editor
# Dump MailPoet autoload
# This is needed to refresh classmap autoload when the composer cache is hit
- name: Dump MailPoet autoload
run: ./tools/vendor/composer.phar dump-autoload
working-directory: mailpoet
- name: Run code phpstan
run: ../../../mailpoet/tools/vendor/composer.phar phpstan -- --php-version=${{ matrix.php-version == '7.4' && '70400' || '80200' }}
working-directory: packages/php/email-editor

39
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,39 @@
name: Make release
on:
push:
tags:
- '*' # Trigger on any tag push
env:
NODE_OPTIONS: "--max-old-space-size=8192"
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Pre-reqs
run: |
sudo apt update
sudo apt install -y ca-certificates php php-symfony composer php-cli php-gd php-mysql golang npm
npm install -g pnpm
- name: Build zip file
run: |
cd mailpoet || { echo "Directory 'mailpoet' not found"; exit 1; }
cp .env.sample .env
composer update
sh build.sh
mkdir -p ../output
mv mailpoet.zip ../output
- name: Upload Release
uses: https://gitea.com/actions/release-action@main
with:
files: |-
output/mailpoet.zip
api_key: '${{secrets.RELEASE_SMITH_TOKEN}}'

View File

@@ -16,8 +16,14 @@ function getWordpressVersions(int $page = 1, int $pageSize = 100): array {
* We prefer the latest patch versions of WordPress with specified PHP versions.
* For example: 6.5.4-php8.3
*/
function filterVersions(array $versions): array {
return array_filter($versions, fn($version) => preg_match('/^\d+\.\d+\.\d+-php\d+\.\d+$/', $version));
function filterVersions(array $versions, string $maxPhpVersion): array {
return array_filter($versions, function($version) use ($maxPhpVersion) {
if (!preg_match('/^\d+\.\d+\.\d+-php(\d+\.\d+)$/', $version, $matches)) {
return false;
}
$phpVersion = $matches[1];
return version_compare($phpVersion, $maxPhpVersion, '<=');
});
}
/**
@@ -88,6 +94,15 @@ $maxPages = 8;
$latestVersion = null;
$previousVersion = null;
// Get max PHP version from command line argument
if (!isset($argv[1])) {
echo "Error: Maximum PHP version argument is required\n";
echo "Example: php check_wordpress_versions.php 8.3\n";
exit(1);
}
$maxPhpVersion = $argv[1];
echo "Using maximum PHP version: $maxPhpVersion\n";
echo "Fetching WordPress versions...\n";
// We fetch the versions until we find the latest and previous versions. But there is a limit of 4 pages.
@@ -95,7 +110,7 @@ while (($latestVersion === null || $previousVersion === null) && $page <= $maxPa
echo "Fetching page $page...\n";
$versions = getWordpressVersions($page);
$allVersions = array_merge($allVersions, $versions);
$allVersions = filterVersions($allVersions);
$allVersions = filterVersions($allVersions, $maxPhpVersion);
sortVersions($allVersions);
[$latestVersion, $previousVersion] = getLatestAndPreviousVersions($allVersions);
$page++;

View File

@@ -118,10 +118,21 @@ function replacePrivatePluginVersion(
string $configParameterName,
string $versionsFilename
): void {
// Read the GitHub token from environment variable
$token = getenv('GH_TOKEN');
// Read the GitHub token from environment variable. Set at https://github.com/mailpoet/mailpoet/settings/secrets/actions.
// If the repository is woocommerce, use the WooCommerce token, otherwise use the general token.
$isWooCommerceRepository = strpos($repository, 'woocommerce/') !== false;
if ($isWooCommerceRepository) {
$token = getenv('WP_GITHUB_WOOCOMMERCE_TOKEN');
} else {
$token = getenv('WP_GITHUB_TOKEN');
}
if (!$token) {
die("GitHub token not found. Make sure it's set in the environment variable 'GH_TOKEN'.");
if ($isWooCommerceRepository) {
die("WooCommerce token not found. For WooCommerce repositories requests, make sure to set the token in the environment variable 'WP_GITHUB_WOOCOMMERCE_TOKEN'.");
} else {
die("GitHub token not found. Make sure it's set in the environment variable 'WP_GITHUB_TOKEN'.");
}
}
$page = 1;

View File

@@ -1,182 +0,0 @@
name: Check new versions of plugins and WordPress
on:
schedule:
- cron: '0 6 * * 1' # At 06:00 on Monday
workflow_dispatch: # Allows manual triggering
jobs:
check-versions:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3' # Specify the PHP version you want to use
# Updating used WordPress
- name: Check WordPress Docker Versions
run: php .github/workflows/scripts/check_wordpress_versions.php
- name: Check for WordPress changes
id: check_wp_changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
if [ "$(git status --porcelain)" != "" ]; then
echo "CHANGES_DETECTED=true" >> $GITHUB_ENV
echo "WORDPRESS_CHANGES=true" >> $GITHUB_ENV
fi
- name: Get WordPress versions from files
id: get_wp_versions
run: |
echo "WORDPRESS_LATEST_VERSION=$(cat /tmp/latest_wordpress_version.txt)" >> $GITHUB_ENV
echo "WORDPRESS_PREVIOUS_VERSION=$(cat /tmp/previous_wordpress_version.txt)" >> $GITHUB_ENV
- name: Commit WordPress changes
if: env.WORDPRESS_CHANGES == 'true'
run: |
git add .
git commit -m $'Update used WordPress images in Circle CI\n\n - latest version: ${{ env.WORDPRESS_LATEST_VERSION }}\n - previous version: ${{ env.WORDPRESS_PREVIOUS_VERSION }}'
# Updating used WooCommerce plugin
- name: Check WooCommerce Versions
run: php .github/workflows/scripts/check_woocommerce_versions.php
- name: Check for WooCommerce changes
id: check_wc_changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
if [ "$(git status --porcelain)" != "" ]; then
echo "CHANGES_DETECTED=true" >> $GITHUB_ENV
echo "WOOCOMMERCE_CHANGES=true" >> $GITHUB_ENV
fi
- name: Get WooCommerce versions from files
id: get_wc_versions
run: |
echo "WOOCOMMERCE_LATEST_VERSION=$(cat /tmp/latest_woocommerce_version.txt)" >> $GITHUB_ENV
echo "WOOCOMMERCE_PREVIOUS_VERSION=$(cat /tmp/previous_woocommerce_version.txt)" >> $GITHUB_ENV
- name: Commit WooCommerce changes
if: env.WOOCOMMERCE_CHANGES == 'true'
run: |
git add .
git commit -m $'Update used WooCommerce plugin in Circle CI\n\n - latest version: ${{ env.WOOCOMMERCE_LATEST_VERSION }}\n - previous version: ${{ env.WOOCOMMERCE_PREVIOUS_VERSION }}'
# Updating used Automate Woo plugin
- name: Check Automate Woo Versions
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: php .github/workflows/scripts/check_automate_woo_versions.php
- name: Check for Automate Woo changes
id: check_aw_changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
if [ "$(git status --porcelain)" != "" ]; then
echo "CHANGES_DETECTED=true" >> $GITHUB_ENV
echo "AUTOMATE_WOO_CHANGES=true" >> $GITHUB_ENV
fi
- name: Get Automate Woo versions from files
id: get_aw_versions
run: |
echo "AUTOMATE_WOO_LATEST_VERSION=$(cat /tmp/latest_automate_woo_version.txt)" >> $GITHUB_ENV
echo "AUTOMATE_WOO_PREVIOUS_VERSION=$(cat /tmp/previous_automate_woo_version.txt)" >> $GITHUB_ENV
- name: Commit Automate Woo changes
if: env.AUTOMATE_WOO_CHANGES == 'true'
run: |
git add .
git commit -m $'Update used Automate Woo plugin in Circle CI\n\n - latest version: ${{ env.AUTOMATE_WOO_LATEST_VERSION }}\n - previous version: ${{ env.AUTOMATE_WOO_PREVIOUS_VERSION }}'
# Updating used WooCommerce Subscriptions plugin
- name: Check WooCommerce Subscriptions Versions
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: php .github/workflows/scripts/check_woocommerce_subscriptions_versions.php
- name: Check for WooCommerce Subscriptions changes
id: check_ws_changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
if [ "$(git status --porcelain)" != "" ]; then
echo "CHANGES_DETECTED=true" >> $GITHUB_ENV
echo "SUBSCRIPTIONS_CHANGES=true" >> $GITHUB_ENV
fi
- name: Get WooCommerce Subscriptions versions from files
id: get_ws_versions
run: |
echo "WOOCOMMERCE_SUBSCRIPTIONS_LATEST_VERSION=$(cat /tmp/latest_woocommerce_subscriptions_version.txt)" >> $GITHUB_ENV
echo "WOOCOMMERCE_SUBSCRIPTIONS_PREVIOUS_VERSION=$(cat /tmp/previous_woocommerce_subscriptions_version.txt)" >> $GITHUB_ENV
- name: Commit WooCommerce Subscriptions changes
if: env.SUBSCRIPTIONS_CHANGES == 'true'
run: |
git add .
git commit -m $'Update used WooCommerce Subscriptions plugin in Circle CI\n\n - latest version: ${{ env.WOOCOMMERCE_SUBSCRIPTIONS_LATEST_VERSION }}\n - previous version: ${{ env.WOOCOMMERCE_SUBSCRIPTIONS_PREVIOUS_VERSION }}'
# Updating used WooCommerce Memberships plugin
- name: Check WooCommerce Memberships Versions
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: php .github/workflows/scripts/check_woocommerce_memberships_versions.php
- name: Check for WooCommerce Memberships changes
id: check_wm_changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
if [ "$(git status --porcelain)" != "" ]; then
echo "CHANGES_DETECTED=true" >> $GITHUB_ENV
echo "MEMBERSHIPS_CHANGES=true" >> $GITHUB_ENV
fi
- name: Get WooCommerce Memberships versions from files
id: get_wm_versions
run: |
echo "WOOCOMMERCE_MEMBERSHIPS_LATEST_VERSION=$(cat /tmp/latest_woocommerce_memberships_version.txt)" >> $GITHUB_ENV
echo "WOOCOMMERCE_MEMBERSHIPS_PREVIOUS_VERSION=$(cat /tmp/previous_woocommerce_memberships_version.txt)" >> $GITHUB_ENV
- name: Commit WooCommerce Memberships changes
if: env.MEMBERSHIPS_CHANGES == 'true'
run: |
git add .
git commit -m $'Update used WooCommerce Memberships plugin in Circle CI\n\n - latest version: ${{ env.WOOCOMMERCE_MEMBERSHIPS_LATEST_VERSION }}\n - previous version: ${{ env.WOOCOMMERCE_MEMBERSHIPS_PREVIOUS_VERSION }}'
# Push all changes at the end if any changes were detected
#
# For local testing with act tool add following:
# env:
# GH_PAT: ${{ secrets.GH_TOKEN }}
# run: |
# git remote set-url origin https://${GH_PAT}@github.com/mailpoet/mailpoet
# git push -f origin HEAD:refs/heads/update-plugins-and-wordpress-test
- name: Push changes
if: env.CHANGES_DETECTED == 'true'
run: |
git push -f origin HEAD:refs/heads/update-plugins-and-wordpress
# Create a pull request if there are changes
- name: Create Pull Request
if: env.CHANGES_DETECTED == 'true'
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GH_TOKEN }}
branch: update-plugins-and-wordpress
title: Update WordPress and plugins in CI jobs
base: trunk
labels: automated, check-versions
body: |
1. If all checks passed, you can merge this PR.
2. If the build failed, please investigate the failure and either address the issues or delegate the job. Then, make sure these changes are merged.

View File

@@ -1,27 +0,0 @@
name: Add link to WordPress Playground preview
on:
pull_request:
types: [opened, reopened, synchronize]
jobs:
add-wp-playground-link:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Check and append description
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
PR_NUMBER="${{ github.event.pull_request.number }}"
BRANCH_NAME="${{ github.head_ref }}"
DESCRIPTION="$(gh pr view $PR_NUMBER --json body -q .body)"
HEADING="## Preview"
CONTENT="$(printf "${HEADING}\n\n[Preview in WordPress Playground](https://account.mailpoet.com/playground/new/branch:${BRANCH_NAME})\n\n_The latest successful build from \`${BRANCH_NAME}\` will be used. If none is available, the link won't work._")"
if [[ "$DESCRIPTION" != *"$HEADING"* ]]; then
gh pr edit $PR_NUMBER --body "$(printf "${DESCRIPTION}\n\n${CONTENT}")"
fi

View File

@@ -38,9 +38,9 @@ There is a `./do` command that helps with the development process. See [README](
- Do not commit to trunk.
- Open a short-living feature branch.
- Use good commit messages as explained here https://chris.beams.io/posts/git-commit. Include Jira ticket in the commit message.
- Use good commit messages as explained here https://chris.beams.io/posts/git-commit. Include Linear issue ID in the commit message.
- Use the `./do qa` command to check your code style before pushing.
- Create a pull request when finished. Include Jira ticket in the title of the pull request.
- Create a pull request when finished.
- Wait for review from another developer.
## Feature flags

View File

@@ -56,15 +56,6 @@
<td>App for development</td>
<td><a href="http://localhost:8002">http://localhost:8002</a></td>
</tr>
<tr>
<td>🚥</td>
<td>
<a href="http://localhost:8003">WordPress Tests</a>
[<a href="http://localhost:8003/wp-admin/">wp-admin</a>]
</td>
<td>App for E2E tests</td>
<td><a href="http://localhost:8003">http://localhost:8003</a></td>
</tr>
<tr>
<td>💾</td>
<td>

View File

@@ -1,10 +0,0 @@
#!/bin/bash
set -e
RUNMYSQL="mysql --user=root --password=${MYSQL_ROOT_PASSWORD}"
$RUNMYSQL <<EOSQL
CREATE DATABASE ${MYSQL_TEST_DATABASE};
GRANT ALL PRIVILEGES ON ${MYSQL_TEST_DATABASE}.* TO '${MYSQL_USER}'@'%';
FLUSH PRIVILEGES;
EOSQL

View File

@@ -27,7 +27,7 @@ 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.3.1" --depth 1 https://github.com/xdebug/xdebug.git /usr/src/php/ext/xdebug \
RUN git clone -b "3.4.2" --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

46
dev/php83/Dockerfile Normal file
View File

@@ -0,0 +1,46 @@
FROM wordpress:php8.3-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.4.2" --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

46
dev/php84/Dockerfile Normal file
View File

@@ -0,0 +1,46 @@
FROM wordpress:php8.4-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.4.5" --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

@@ -9,11 +9,6 @@ services:
- nfs-mailpoet:/var/www/html/wp-content/plugins/mailpoet
- nfs-mailpoet-premium:/var/www/html/wp-content/plugins/mailpoet-premium
test_wordpress:
volumes:
- nfs-mailpoet:/var/www/html/wp-content/plugins/mailpoet
- nfs-mailpoet-premium:/var/www/html/wp-content/plugins/mailpoet-premium
volumes:
nfs-wordpress:
driver: local

View File

@@ -12,12 +12,10 @@ services:
image: mysql:5.7
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
MYSQL_TEST_DATABASE: test_wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
@@ -25,7 +23,7 @@ services:
container_name: mp-wp
build:
context: .
dockerfile: dev/php82/Dockerfile
dockerfile: dev/php83/Dockerfile
args:
UID: ${UID:-1000}
GID: ${GID:-1000}
@@ -60,31 +58,6 @@ services:
- './packages:/var/www/html/wp-content/plugins/packages'
- './templates:/var/www/templates'
test_wordpress:
container_name: mp-test-wp
build:
context: .
dockerfile: dev/php81/Dockerfile
args:
UID: ${UID:-1000}
GID: ${GID:-1000}
ports:
- '8003:80'
depends_on:
- db
- smtp
user: ${UID:-1000}:${GID:-1000}
environment:
WORDPRESS_DB_NAME: test_wordpress
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
PHP_IDE_CONFIG: 'serverName=Mailpoet'
volumes:
- './mailpoet:/var/www/html/wp-content/plugins/mailpoet'
- './mailpoet-premium:/var/www/html/wp-content/plugins/mailpoet-premium'
- './packages:/var/www/html/wp-content/plugins/packages'
smtp:
container_name: mp-mailhog
image: mailhog/mailhog:v1.0.0

View File

@@ -34,9 +34,8 @@ WP_CIRCLECI_TOKEN=
WP_GITHUB_USERNAME=
WP_GITHUB_TOKEN=
# Jira username/email and a token from https://id.atlassian.com/manage/api-tokens:
WP_JIRA_USER=
WP_JIRA_TOKEN=
# GitHub fine-grained token for the WooCommerce organization. Fetch it from the Secret Store by searching for "MailPoet: GitHub MailPoet CI - WooCommerce token".
WP_GITHUB_WOOCOMMERCE_TOKEN=
# k6 performance test suite
# Get following secrets from the Secret Store, look for "MailPoet: plugin .env":

1
mailpoet/.gitleaksignore Normal file
View File

@@ -0,0 +1 @@
/mailpoet/assets/dist/js/public.js:generic-api-key:2

44
mailpoet/CHANGELOG.md Normal file
View File

@@ -0,0 +1,44 @@
# Changelog System
The `changelog/` directory contains individual changelog entries that are compiled into the final changelog during releases.
## How it works
Create individual changelog files in this directory. Each file represents a single changelog entry.
## File naming convention
Files should be named using the following pattern:
- `YYYY-MM-DD-HH-MM-SS-{type}-{description}.md`
Examples:
- `2024-01-15-14-30-00-fix-undefined-array-key.md`
- `2024-01-15-14-35-00-improve-polylang-support.md`
- `2024-01-15-14-40-00-update-woocommerce-segments.md`
## File format
Each changelog file should contain:
```markdown
# Type: {Added|Improved|Fixed|Changed|Updated|Removed}
# Description
Brief description of the change
```
## Types
- `Added`: New features
- `Improved`: Enhancements to existing features
- `Fixed`: Bug fixes
- `Changed`: Changes to existing functionality
- `Updated`: Updates to dependencies, requirements, etc.
- `Removed`: Removed features or functionality
## Compilation
During the release process, these individual files are compiled into the final changelog format used in `readme.txt` and `changelog.txt`.

View File

@@ -9,8 +9,9 @@
4. [Coding and Testing](#coding-and-testing)
1. [DI](#di)
2. [PHP-Scoper](#php-scoper)
3. [i18n](#i18n)
4. [Acceptance testing](#acceptance-testing)
3. [Changelog](#changelog)
4. [i18n](#i18n)
5. [Acceptance testing](#acceptance-testing)
## MailPoet
@@ -121,6 +122,8 @@ $ ./do qa # PHP and JS linters.
$ ./do release:changelog-get [--version-name=...] # Prints out changelog and release notes for given version or for newest version.
$ ./do release:changelog-update [--version-name=...] [--quiet] # Updates changelog in readme.txt for given version or for newest version.
$ ./do changelog:add --type=<type> --description=<description> # Creates a new changelog entry
$ ./do changelog:preview [--version=<version>] # Preview compiled changelog for next version
$ ./do container:dump # Generates DI container cache.
@@ -140,6 +143,16 @@ You can check [the docs](https://symfony.com/doc/3.4/components/dependency_injec
We use PHP-Scoper package to prevent plugin libraries conflicts in PHP. Two plugins may be using different versions of a library. PHP-Scoper prefix dependencies namespaces and they are then moved into `vendor-prefixed` directory.
Dependencies handled by PHP-Scoper are configured in extra configuration files `prefixer/composer.json` and `prefixer/scoper.inc.php`. Installation and processing is triggered in post scripts of the main `composer.json` file.
### Changelog
Create changelog entries using:
```bash
./do changelog:add --type=Fixed --description="Brief description of the change"
```
See [readme](changelog/README.md) for detailed documentation.
### i18n
We use functions `__()`, `_n()`, `_x()`, and `_nx()` with domain `mailpoet` to translate strings. Please follow [best practices](https://codex.wordpress.org/I18n_for_WordPress_Developers).

View File

@@ -3,7 +3,6 @@
// phpcs:disable PSR1.Classes.ClassDeclaration
// phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace
use MailPoetVendor\Twig\Loader\FilesystemLoader as TwigFileSystem;
use Robo\Symfony\ConsoleIO;
class RoboFile extends \Robo\Tasks {
const ZIP_BUILD_PATH = __DIR__ . '/mailpoet.zip';
@@ -524,7 +523,9 @@ class RoboFile extends \Robo\Tasks {
}
public function containerDump() {
define('ABSPATH', getenv('WP_ROOT') . '/');
if (!defined('ABSPATH')) {
define('ABSPATH', getenv('WP_ROOT') . '/');
}
if (!file_exists(ABSPATH . 'wp-config.php')) {
$this->yell('WP_ROOT env variable does not contain valid path to wordpress root.', 40, 'red');
exit(1);
@@ -996,20 +997,17 @@ class RoboFile extends \Robo\Tasks {
}
public function releasePrepare($version = null) {
$version = $this->releaseVersionAssign($version, ['return' => true]);
$version = $this->releaseVersionGetNext($version);
return $this->collectionBuilder()
->addCode(function () use ($version) {
return $this->releaseCheckIssues($version);
})
->addCode(function () {
$this->releasePrepareGit();
})
->addCode(function () use ($version) {
return $this->releaseVersionWrite($version);
$this->releaseVersionWrite($version);
})
->addCode(function () use ($version) {
return $this->releaseChangelogWrite($version);
$this->releaseChangelogWrite($version);
})
->addCode(function () use ($version) {
$this->releaseCreatePullRequest($version);
@@ -1023,20 +1021,6 @@ class RoboFile extends \Robo\Tasks {
->run();
}
public function releaseCheckIssues($version = null) {
$jira = $this->createJiraController();
$version = $jira->getVersion($this->releaseVersionGetNext($version));
$issues = $jira->getIssuesDataForVersion($version);
$pullRequestsId = \MailPoetTasks\Release\JiraController::PULL_REQUESTS_ID;
foreach ($issues as $issue) {
if (strpos($issue['fields'][$pullRequestsId], 'state=OPEN') !== false) {
$key = $issue['key'];
$this->yell("Some pull request associated to task {$key} is not merged yet!", 40, 'red');
exit(1);
}
}
}
public function releasePrepareGit() {
// make sure working directory is clean
$gitStatus = $this->taskGitStack()
@@ -1121,22 +1105,22 @@ class RoboFile extends \Robo\Tasks {
}
public function releasePublish($version = null) {
$version = $this->releaseVersionGetPrepared($version);
$version = $this->releaseVersionGetNext($version);
return $this->collectionBuilder()
->addCode(function () use ($version) {
return $this->releaseCheckPullRequest($version);
$this->releaseCheckPullRequest($version);
})
->addCode(function () use ($version) {
return $this->translationsCheckLanguagePacks($version);
$this->translationsCheckLanguagePacks($version);
})
->addCode(function () {
return $this->releaseDownloadZip();
$this->releaseDownloadZip();
})
->addCode(function () use ($version) {
return $this->releaseVerifyDownloadedZip($version);
$this->releaseVerifyDownloadedZip($version);
})
->addCode(function () {
return $this->translationsGetPotFileFromBuild();
$this->translationsGetPotFileFromBuild();
})
->addCode(function () {
return $this->translationsPush();
@@ -1148,19 +1132,16 @@ class RoboFile extends \Robo\Tasks {
return $this->svnPublish($version);
})
->addCode(function () use ($version) {
return $this->releasePublishGithub($version);
$this->releasePublishGithub($version);
})
->addCode(function () use ($version) {
return $this->releasePublishJira($version);
})
->addCode(function () use ($version) {
return $this->releasePublishSlack($version);
$this->releasePublishSlack($version);
})
->addCode(function () {
return $this->releaseMergePullRequest(\MailPoetTasks\Release\GitHubController::RELEASE_SOURCE_BRANCH);
$this->releaseMergePullRequest(\MailPoetTasks\Release\GitHubController::RELEASE_SOURCE_BRANCH);
})
->addCode(function () {
return $this->releaseDeleteDownloadedZip();
$this->releaseDeleteDownloadedZip();
})
->run();
}
@@ -1176,84 +1157,20 @@ class RoboFile extends \Robo\Tasks {
$this->say("Pull request for branch: '{$branch}' was successfully merged");
}
/**
* This command displays how many pull request each person did recently
*/
public function displayReviewers(ConsoleIO $io) {
$io->progressStart(2);
$freePluginGithubController = $this->createGitHubController();
$logins = $freePluginGithubController->calculateReviewers();
$io->progressAdvance();
$shopGithubController = $this->createGitHubController(\MailPoetTasks\Release\GitHubController::PROJECT_SHOP);
$loginsShop = $shopGithubController->calculateReviewers();
$io->progressFinish();
$printReviewers = function ($logins, $header) use ($io) {
$io->title($header);
$outputList = [];
foreach ($logins as $login => $num) {
$outputList[] = [$login => $num];
}
$io->definitionList(...$outputList);
};
arsort($logins);
$printReviewers($logins, 'Free plugin');
arsort($loginsShop);
$printReviewers($loginsShop, 'Shop');
foreach ($loginsShop as $loginShop => $num) {
if (!isset($logins[$loginShop])) {
$logins[$loginShop] = 0;
}
$logins[$loginShop] += $num;
}
arsort($logins);
$printReviewers($logins, 'Full');
}
public function displayCreatedPullRequests(ConsoleIO $io, int $months = 6) {
$projects = [
\MailPoetTasks\Release\GitHubController::PROJECT_SHOP,
\MailPoetTasks\Release\GitHubController::PROJECT_MAILPOET,
\MailPoetTasks\Release\GitHubController::PROJECT_PREMIUM,
];
$io->progressStart(count($projects));
$counts = [];
foreach ($projects as $project) {
$githubController = $this->createGitHubController($project);
$countsProject = $githubController->calculatePRcounts($months);
foreach ($countsProject as $login => $num) {
if (!isset($counts[$login])) {
$counts[$login] = 0;
}
$counts[$login] += $num;
}
$io->progressAdvance();
}
$io->progressFinish();
arsort($counts);
$io->title('Pull Request counts');
$outputList = [];
foreach ($counts as $login => $num) {
$outputList[] = [
$login,
$num,
round($num / $months, 2),
];
}
$io->table(['Login', 'Count', 'Per month'], $outputList);
}
public function releaseCheckPullRequest($version) {
$this->createGitHubController()
->checkReleasePullRequestPassed($version);
}
public function releaseVersionGetLatest($version = null) {
if (!$version) {
$version = $this->getReleaseVersionController()
->getLatestVersion();
}
$this->validateVersion($version);
return $version;
}
public function releaseVersionGetNext($version = null) {
if (!$version) {
$version = $this->getReleaseVersionController()
@@ -1263,30 +1180,6 @@ class RoboFile extends \Robo\Tasks {
return $version;
}
public function releaseVersionGetPrepared($version = null) {
if (!$version) {
$version = $this->getReleaseVersionController()
->getPreparedVersion();
}
$this->validateVersion($version);
return $version;
}
public function releaseVersionAssign($version = null, $opts = []) {
$version = $this->releaseVersionGetNext($version);
try {
[$version, $output] = $this->getReleaseVersionController()
->assignVersionToCompletedTickets($version);
} catch (\Exception $e) {
$this->yell($e->getMessage(), 40, 'red');
exit(1);
}
$this->say($output);
if (!empty($opts['return'])) {
return $version;
}
}
public function releaseVersionWrite($version) {
$version = trim($version);
$this->validateVersion($version);
@@ -1307,17 +1200,48 @@ class RoboFile extends \Robo\Tasks {
->run();
}
public function releaseChangelogGet($version = null) {
$outputs = $this->getChangelogController()->get($version);
$this->say("Changelog \n{$outputs[0]} \n{$outputs[1]}\n");
$this->say("IMPORTANT NOTES \n" . ($outputs[2] ?: 'none'));
public function releaseChangelogGet($version) {
$changelog = $this->getChangelogController()->get($version);
$this->say("Changelog \n{$changelog}");
}
public function releaseChangelogWrite($version = null) {
public function releaseChangelogWrite($version) {
$this->say("Updating changelog");
$outputs = $this->getChangelogController()->update($version);
$this->say("Changelog \n{$outputs[0]} \n{$outputs[1]}\n\n");
$this->say("IMPORTANT NOTES \n" . ($outputs[2] ?: 'none'));
$changelog = $this->getChangelogController()->update($version);
$this->say("Changelog \n{$changelog}");
}
public function changelogAdd($opts = ['type' => '', 'description' => '']) {
$type = $opts['type'];
$description = $opts['description'];
if (empty($type)) {
$this->say('Please specify a type with --type=<type>');
$this->say('Valid types: Added, Improved, Fixed, Changed, Updated, Removed');
exit(1);
}
if (empty($description)) {
$this->say('Please specify a description with --description=<description>');
exit(1);
}
$changelogger = new \MailPoetTasks\Release\Changelogger();
$filePath = $changelogger->createChangelogEntry($type, $description);
$this->say("Changelog entry created: $filePath");
}
public function changelogPreview($version = null) {
if (!$version) {
$version = $this->releaseVersionGetNext($version);
}
$changelogger = new \MailPoetTasks\Release\Changelogger();
$changelog = $changelogger->compileChangelog($version);
$this->say("Preview changelog for version $version:");
$this->say($changelog);
}
public function releaseVerifyDownloadedZip($version) {
@@ -1357,30 +1281,21 @@ class RoboFile extends \Robo\Tasks {
}
public function releasePublishGithub($version = null) {
$jiraController = $this->createJiraController();
$version = $jiraController->getVersion($version);
$changelog = $this->getChangelogController()->get($version['name']);
$version = $this->releaseVersionGetNext($version);
$changelog = $this->getChangelogController()->get($version);
$githubController = $this->createGitHubController();
$githubController->publishRelease($version['name'], $changelog[1], self::ZIP_BUILD_PATH);
$this->say("Release '$version[name]' was published to GitHub.");
}
public function releasePublishJira($version = null) {
$version = $this->releaseVersionGetPrepared($version);
$jiraController = $this->createJiraController();
$jiraVersion = $jiraController->releaseVersion($version);
$this->say("JIRA version '$jiraVersion[name]' was released.");
$githubController->publishRelease($version, $changelog, self::ZIP_BUILD_PATH);
$this->say("Release '$version' was published to GitHub.");
}
public function releasePublishSlack($version = null) {
$jiraController = $this->createJiraController();
$version = $jiraController->getVersion($version);
$changelog = $this->getChangelogController()->get($version['name']);
$version = $this->releaseVersionGetLatest($version);
$changelog = $this->getChangelogController()->get($version);
$slackNotifier = $this->createSlackNotifier();
$slackNotifier->notify($version['name'], $changelog[1], $version['id']);
$this->say("Release '$version[name]' info was published on Slack.");
$slackNotifier->notify($version, $changelog);
$this->say("Release '$version' info was published on Slack.");
}
public function releaseRerunCircleWorkflow(?string $project = null) {
@@ -1395,30 +1310,34 @@ class RoboFile extends \Robo\Tasks {
}
}
public function downloadWooCommerceMembershipsZip($tag = null) {
if (!getenv('WP_GITHUB_USERNAME') && !getenv('WP_GITHUB_TOKEN')) {
public function downloadWooCommerceMembershipsZip(): void {
$token = getenv('WP_GITHUB_WOOCOMMERCE_TOKEN');
if (!getenv('WP_GITHUB_USERNAME') && !$token) {
$this->yell("Skipping download of WooCommerce Memberships", 40, 'red');
exit(0); // Exit with 0 since it is a valid state for some environments
}
$this->createGithubClient('woocommerce/woocommerce-memberships')
->downloadReleaseZip('woocommerce-memberships.zip', __DIR__ . '/tests/plugins/', $tag);
$this->createGithubClient('woocommerce/all-plugins', $token)
->downloadRawFile('https://api.github.com/repos/woocommerce/all-plugins/contents/product-packages/woocommerce-memberships/woocommerce-memberships.zip?ref=master', 'woocommerce-memberships.zip', __DIR__ . '/tests/plugins/');
}
public function downloadWooCommerceSubscriptionsZip($tag = null) {
if (!getenv('WP_GITHUB_USERNAME') && !getenv('WP_GITHUB_TOKEN')) {
$token = getenv('WP_GITHUB_WOOCOMMERCE_TOKEN');
if (!getenv('WP_GITHUB_USERNAME') && !$token) {
$this->yell("Skipping download of WooCommerce Subscriptions", 40, 'red');
exit(0); // Exit with 0 since it is a valid state for some environments
}
$this->createGithubClient('woocommerce/woocommerce-subscriptions')
$this->createGithubClient('woocommerce/woocommerce-subscriptions', $token)
->downloadReleaseZip('woocommerce-subscriptions.zip', __DIR__ . '/tests/plugins/', $tag);
}
public function downloadAutomateWooZip($tag = null) {
if (!getenv('WP_GITHUB_USERNAME') && !getenv('WP_GITHUB_TOKEN')) {
$token = getenv('WP_GITHUB_WOOCOMMERCE_TOKEN');
if (!getenv('WP_GITHUB_USERNAME') && !$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->createGithubClient('woocommerce/automatewoo')
$this->createGithubClient('woocommerce/automatewoo', $token)
->downloadReleaseZip('automatewoo.zip', __DIR__ . '/tests/plugins/', $tag);
}
@@ -1554,26 +1473,13 @@ class RoboFile extends \Robo\Tasks {
}
protected function getChangelogController() {
return new \MailPoetTasks\Release\ChangelogController(
$this->createJiraController(),
__DIR__ . '/readme.txt'
);
return new \MailPoetTasks\Release\ChangelogController(__DIR__ . '/readme.txt');
}
protected function getReleaseVersionController() {
return new \MailPoetTasks\Release\ReleaseVersionController(
$this->createJiraController(),
$this->createGitHubController(),
\MailPoetTasks\Release\JiraController::PROJECT_MAILPOET
);
}
protected function createJiraController() {
$help = 'Use your JIRA username and a token from https://id.atlassian.com/manage/api-tokens.';
return new \MailPoetTasks\Release\JiraController(
$this->getEnv('WP_JIRA_TOKEN', $help),
$this->getEnv('WP_JIRA_USER', $help),
\MailPoetTasks\Release\JiraController::PROJECT_MAILPOET
\MailPoetTasks\Release\GitHubController::PROJECT_MAILPOET
);
}
@@ -1587,11 +1493,12 @@ class RoboFile extends \Robo\Tasks {
);
}
protected function createGitHubController($project = \MailPoetTasks\Release\GitHubController::PROJECT_MAILPOET) {
protected function createGitHubController($project = \MailPoetTasks\Release\GitHubController::PROJECT_MAILPOET, $token = null) {
$help = "Use your GitHub username and a token from https://github.com/settings/tokens with 'repo' scopes.";
$token = $token ?: $this->getEnv('WP_GITHUB_TOKEN', $help);
return new \MailPoetTasks\Release\GitHubController(
$this->getEnv('WP_GITHUB_USERNAME', $help),
$this->getEnv('WP_GITHUB_TOKEN', $help),
$token,
$project
);
}
@@ -1628,12 +1535,13 @@ class RoboFile extends \Robo\Tasks {
return $exitCode;
}
private function createGithubClient($repositoryName) {
private function createGithubClient($repositoryName, $token = null) {
require_once __DIR__ . '/tasks/GithubClient.php';
$token = $token ?: $this->getEnv('WP_GITHUB_TOKEN');
return new \MailPoetTasks\GithubClient(
$repositoryName,
getenv('WP_GITHUB_USERNAME') ?: null,
getenv('WP_GITHUB_TOKEN') ?: null
$token
);
}
@@ -1643,7 +1551,9 @@ class RoboFile extends \Robo\Tasks {
}
private function createDoctrineEntityManager() {
define('ABSPATH', getenv('WP_ROOT') . '/');
if (!defined('ABSPATH')) {
define('ABSPATH', getenv('WP_ROOT') . '/');
}
if (\MailPoet\Config\Env::$dbPrefix === null) {
/**
* Ensure some prefix is set

View File

@@ -2,10 +2,6 @@
#mailpoet_automation * {
box-sizing: border-box;
.mailpoet-add-new-button {
padding-right: 12px;
}
}
.mailpoet-automation-is-onboarding {

View File

@@ -151,7 +151,7 @@
}
.marker {
color: #ff5301;
color: $color-secondary;
display: inline-block;
font-size: 16px;
font-weight: 600;

View File

@@ -8,10 +8,6 @@
margin-bottom: 5px;
}
.mailpoet_form_field_title_small {
width: 120px;
}
.mailpoet_form_field_title_inline {
display: inline-block;
margin-bottom: 0;

View File

@@ -19,6 +19,10 @@
flex-direction: column;
justify-content: flex-start;
}
.mailpoet_editor_settings {
padding: 0;
}
}
.mailpoet_sidepanel_field {

View File

@@ -64,6 +64,10 @@
> .mailpoet_container
.mailpoet_automated_latest_content_block_posts
.mailpoet_container_horizontal,
> .mailpoet_container_block
> .mailpoet_container
.mailpoet_dynamic_products_block_posts
.mailpoet_container_horizontal,
> .mailpoet_container_block
> .mailpoet_container
> .mailpoet_products_block

View File

@@ -62,6 +62,10 @@
}
}
.mailpoet_coupon_block_settings {
margin: 0 -20px;
}
.mailpoet_coupon_block_settings,
.mailpoet_coupon_block_display_options {
@include animation-slide-open-downwards();

View File

@@ -0,0 +1,63 @@
.mailpoet_dynamic_products_block {
padding: 0;
}
.mailpoet_dynamic_products_block_overlay {
background: rgba(#fff, 0);
height: 100%;
position: absolute;
transition: background 0.15s ease-out;
width: 100%;
z-index: 19;
.mailpoet_dynamic_products_block:hover & {
background: rgba(#fff, 0.9);
cursor: pointer;
.mailpoet_overlay_message {
display: block;
}
}
.mailpoet_overlay_message {
color: black;
display: none;
font-size: 20px;
margin: 80px;
text-align: center;
}
}
.mailpoet_dynamic_products_block_posts {
overflow: hidden;
pointer-events: none;
> .mailpoet_block {
width: 100%;
}
.mailpoet_container_block {
padding-bottom: 0;
padding-top: 0;
}
}
.mailpoet_dynamic_products_display_options {
@include animation-slide-open-downwards();
}
.mailpoet_dynamic_products_show_amount {
width: 38px;
}
.mailpoet_dynamic_products_content_type {
width: 180px;
}
.mailpoet_dynamic_products_display_options.mailpoet_closed {
display: none;
}
.mailpoet_dynamic_products_selected_products {
padding-left: 20px;
}

View File

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

View File

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

View File

@@ -21,11 +21,33 @@
}
}
.mailpoet_social_icons_container {
> input {
vertical-align: top;
&:checked
~ #mailpoet_social_icons_styles
.mailpoet_social_icon_set:not([data-setname^='official']) {
display: block;
}
}
> label {
display: inline-block;
margin: -0.25rem 0 0.5rem;
vertical-align: top;
}
}
.mailpoet_social_icon_set {
border: 1px solid transparent;
margin-bottom: 5px;
padding: 5px;
&:not([data-setname^='official']) {
display: none;
}
&:hover {
border: 1px solid $editor-social-icon-border-color-hover;
}

View File

@@ -114,7 +114,7 @@
&:hover {
background-color: #fff !important;
color: #ff5301 !important;
color: $color-secondary !important;
}
}

View File

@@ -24,6 +24,11 @@ $mailpoet-form-template-thumbnail-height: 316px;
.mailpoet-categories {
grid-column: 1 / -1;
justify-content: center;
.components-tab-panel__tabs-item {
padding-left: 14px;
padding-right: 14px;
}
}
}

View File

@@ -64,31 +64,42 @@ p.sender_email_address_warning:first-child {
margin-bottom: $grid-gap;
}
.mailpoet-subscribers-in-plan {
font-size: 18px;
margin-bottom: 20px;
position: relative;
z-index: 1;
.mailpoet-subscribers-in-plan-spacer {
display: inline-block;
width: 20px;
}
.tooltip {
position: relative;
top: -1px;
vertical-align: middle;
}
@include respond-to(small-screen) {
margin-top: 0;
}
.mailpoet-page-header {
align-items: center;
display: flex;
padding-top: 2px;
}
.mailpoet-subscribers-cache-notice {
.mailpoet-subscribers-cache-notice-button {
margin-left: 10px;
.mailpoet-back-button {
display: flex;
padding-top: 5px;
}
.mailpoet-segment-subscriber-count {
align-items: center;
display: flex;
font-size: 13px;
gap: $grid-gap;
margin-bottom: $grid-gap-half;
padding-top: $grid-gap-half;
.mailpoet-segment-help-icon {
display: flex;
}
.mailpoet-segment-subscriber-count-message {
align-items: center;
display: flex;
font-size: 14px;
z-index: 1;
}
.mailpoet-segment-subscriber-cache {
color: $color-text-light;
}
.components-button.is-link {
text-decoration: none;
}
}
@@ -269,15 +280,6 @@ body .components-modal__screen-overlay {
max-width: 1072px;
}
.mailpoet-page-header {
padding-top: 16px;
h1.wp-heading-inline {
margin: 0;
padding: 4px 0;
}
}
.mailpoet-admin-fields {
column-gap: 24px;
display: grid;

View File

@@ -1,6 +1,6 @@
.mailpoet-discount-container {
background: white;
border: 1px solid #ff5301;
border: 1px solid $color-secondary;
margin: 15px;
padding: 20px;
text-align: center;

View File

@@ -127,7 +127,6 @@ progress::-moz-progress-bar {
width: 100%;
.mailpoet-form-input-label {
background: #fff;
bottom: 100%;
color: $color-text-light;
display: none;
@@ -244,3 +243,9 @@ progress::-moz-progress-bar {
.mailpoet-form-field-disabled {
cursor: not-allowed;
}
.mailpoet-password-input-toggle {
border-radius: 0 3px 3px 0 !important;
height: 100%;
padding: 0 10px !important;
}

View File

@@ -1,3 +1,8 @@
#mailpoet-export,
#import_container {
margin-top: $grid-gap-half;
}
.mailpoet_hidden,
.mailpoet_validation_error {
display: none;
@@ -91,3 +96,12 @@ tr {
font-size: $font-size;
}
}
.mailpoet-notice-container {
.mailpoet_notice {
box-sizing: border-box;
margin: 0 0 1em;
max-width: $grid-column;
padding-right: 38px;
}
}

View File

@@ -1,3 +1,28 @@
.admin_page_mailpoet-landingpage {
#wpcontent {
overflow-x: hidden;
}
#wpwrap {
background: white;
}
div.updated,
div.error,
.update-nag,
.notice {
display: none !important;
}
img {
max-width: 100%;
}
#wpfooter {
background: $color-grey-0;
}
}
#mailpoet_landingpage_container {
$content-padding: 32px 65px;
$mobile-content-padding: 25px;

View File

@@ -1,4 +1,6 @@
.mailpoet-forms-listing {
margin-top: $grid-gap-half;
.mailpoet-forms-add-new-row {
text-align: center;
}

View File

@@ -62,31 +62,6 @@
background: $color-badge-green;
}
.mailpoet_badge_video {
background: $color-badge-video-guide;
display: inline-block;
line-height: 20px;
padding: 3px 6px;
text-decoration: none;
vertical-align: top;
&:hover,
&:active,
&:focus {
background: $color-badge-green;
color: #fff;
}
.dashicons {
font-size: 14px;
line-height: 20px;
}
}
.mailpoet_badge_video_grey {
background: #c3c3c3;
}
// h1.title needed to override WP styles specificity
h1.title.mailpoet-newsletter-listing-heading {
margin-bottom: $grid-gap;

View File

@@ -20,8 +20,7 @@
}
.mailpoet-categories {
padding-left: $grid-gap-half;
padding-right: $grid-gap-half;
margin: 0 - $grid-gap 0 - $grid-gap $grid-gap;
}
a {
@@ -72,6 +71,12 @@ input.mailpoet-listing-current-page {
width: 37px;
}
.mailpoet-listing-loading {
[data-automation-id='select_all'] {
display: none;
}
}
.mailpoet-listing-loading tbody tr,
.mailpoet_form_loading div.mailpoet-form-grid {
opacity: 0.2;
@@ -196,8 +201,8 @@ div.mailpoet-listing-bulk-actions-container {
border-bottom: 1px solid $color-tertiary-light;
box-shadow: none;
max-width: 30vw;
padding: $grid-gap-medium $grid-gap-half;
vertical-align: middle;
padding: 12px $grid-gap-half;
vertical-align: top;
@include respond-to(small-screen) {
max-width: none;
@@ -311,13 +316,10 @@ a.mailpoet-listing-title {
.mailpoet-listing-actions {
align-items: center;
display: none;
display: flex;
flex-wrap: wrap;
left: 0;
line-height: 15px;
position: absolute;
top: 0;
width: 100%;
visibility: hidden;
a {
color: $color-text-light;
@@ -341,7 +343,7 @@ a.mailpoet-listing-title {
}
tr:hover & {
display: flex;
visibility: visible;
}
@include respond-to(small-screen) {

View File

@@ -1,13 +1,12 @@
@import '../components-automation/colors';
$mp-toggle-border-radius: 0.125rem;
$mp-toggle-transition: cubic-bezier(0, 1, 0.5, 1);
.mp-toggle {
--toggle-height: 40px;
--font-size: 0.8125rem;
background: #fff;
border-radius: $mp-toggle-border-radius;
border-radius: 3px;
height: var(--toggle-height);
position: relative;
@@ -32,46 +31,43 @@ $mp-toggle-transition: cubic-bezier(0, 1, 0.5, 1);
.mp-toggle__switch {
border: 1px solid $color-gutenberg-grey-400;
border-radius: $mp-toggle-border-radius;
border-radius: 3px;
flex: 0 0 100%;
height: var(--toggle-height);
position: relative;
text-align: center;
&:hover {
cursor: pointer;
}
&:before {
background-color: $color-gutenberg-grey-900;
border-radius: $mp-toggle-border-radius;
color: #fff !important;
content: attr(data-unchecked);
&:before,
&:after {
border-radius: 2px;
font-size: var(--font-size);
font-weight: normal;
left: 0;
height: 100%;
line-height: var(--toggle-height);
min-width: 45px;
padding: 0 12px;
position: absolute;
text-align: center;
top: 0;
transition: background-color 0.3s $mp-toggle-transition;
width: 50%;
}
&:before {
background-color: $color-gutenberg-grey-900;
color: #fff;
content: attr(data-unchecked);
font-weight: normal;
left: 0;
}
&:after {
background-color: #fff;
color: $color-gutenberg-grey-700;
content: attr(data-checked);
font-size: var(--font-size);
left: 50%;
line-height: var(--toggle-height);
min-width: 45px;
padding: 0 12px;
position: absolute;
text-align: center;
top: 0;
transition: background-color 0.3s $mp-toggle-transition;
width: 50%;
right: 0;
z-index: 1;
}
}
@@ -96,46 +92,16 @@ $mp-toggle-transition: cubic-bezier(0, 1, 0.5, 1);
~ label {
.mp-toggle__switch {
&:before {
content: attr(data-checked);
left: 50%;
background-color: #fff;
color: $color-gutenberg-grey-700;
}
&:after {
color: $color-gutenberg-grey-700;
content: attr(data-unchecked);
left: 0;
}
}
&:hover {
color: $color-gutenberg-grey-700;
}
}
&:focus,
&:hover {
~ label {
.mp-toggle__switch {
&:before {
background-color: $color-gutenberg-grey-900;
color: #fff;
}
background-color: $color-gutenberg-grey-900;
color: #fff;
}
}
}
}
&:focus ~ label,
&:hover ~ label {
.mp-toggle__switch {
&:after {
color: $color-gutenberg-grey-900;
}
}
}
&:hover ~ label {
color: $color-gutenberg-grey-900;
}
}
}

View File

@@ -1,277 +0,0 @@
.mailpoet_page_mailpoet-premium,
.admin_page_mailpoet-premium,
.admin_page_mailpoet-landingpage {
#wpcontent {
overflow-x: hidden;
}
#wpwrap {
background: white;
}
div.updated,
div.error,
.update-nag,
.notice {
display: none !important;
}
img {
max-width: 100%;
}
}
.admin_page_mailpoet-landingpage {
#wpfooter {
background: $color-grey-0;
}
}
.mailpoet-premium-page {
color: $color-tertiary;
margin: $grid-gap-large auto 0;
max-width: 944px;
p,
ul {
font-size: $font-size;
line-height: $line-height;
a {
color: $color-secondary;
}
}
p.mailpoet-premium-page-text-large {
font-size: 22px;
}
h1 {
margin-top: 0;
}
hr {
background: $color-tertiary-light;
border: none;
height: 1px;
margin: $grid-gap-large 0;
width: 100%;
}
.mailpoet-button {
margin-top: $grid-gap;
}
}
// "div" used for higher specificity for mobile styles
div.mailpoet-premium-page-section {
padding: $grid-gap-large 0;
position: relative;
z-index: 1;
@include respond-to(small-screen) {
grid-template-columns: 1fr;
text-align: center;
> img {
margin: auto;
max-width: 150px;
order: -1;
}
}
}
.mailpoet-premium-page-section-narrow {
margin: auto;
max-width: 700px;
}
.mailpoet-premium-page-text-center {
text-align: center;
}
.mailpoet-premium-page-intro {
@include full-width-background(
linear-gradient(to top, $color-white, $color-secondary-light)
);
align-items: center;
img {
margin: auto;
max-width: 270px;
}
}
.mailpoet-premium-page-upgrade-to-premium .mailpoet-grid-three-columns {
grid-gap: $grid-gap-large;
}
.mailpoet-premium-page-get-started {
@include full-width-background(
linear-gradient(to top, $color-white, $color-secondary-light)
);
}
.mailpoet-premium-page-bullet-list {
li:before {
content: '·';
padding-right: 5px;
}
}
.mailpoet-premium-page-features {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-around;
.mailpoet-premium-page-feature {
width: 29%;
@include breakpoint-max-width(640px) {
width: 49%;
}
@include breakpoint-max-width(500px) {
width: 100%;
}
p,
h2 {
text-align: left;
}
}
}
.mailpoet-premium-page-options {
margin: auto;
max-width: 1000px;
> div {
align-items: center;
background: $color-white;
border-radius: 8px;
box-shadow: 0 2px 4px 0 $color-secondary-light;
display: flex;
flex-direction: column;
justify-content: space-between;
margin-top: $grid-gap-large;
padding: 24px;
}
.mailpoet-button {
width: 100%;
}
.mailpoet-premium-page-text-large {
color: $color-secondary;
margin-top: 0;
}
ul {
color: $color-secondary;
display: inline-block;
text-align: left;
width: 100%;
li {
margin: $grid-gap 0;
position: relative;
}
li:before {
background-color: $color-secondary-light;
background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0.175 -0.365 17.008 17.008"%3E%3Cpath fill="%23ff5301" d="M16.983 1.923c0 .814-.369 1.607-1.106 2.38l-.114.115-6.453 6.796c-1.37 1.44-2.539 2.555-3.502 3.341s-1.644 1.18-2.041 1.18c-.417 0-.936-.197-1.556-.59-.62-.394-1.02-.799-1.2-1.216-.152-.349-.298-1.086-.434-2.214a30.519 30.519 0 0 1-.204-3.664c0-.717.299-1.38.897-1.988.6-.609 1.261-.914 1.983-.914.689 0 1.1.63 1.232 1.89l.03.324c.111.967.24 1.643.387 2.024.148.383.347.573.597.573.104 0 .299-.112.584-.339.356-.29.697-.598 1.022-.923l6.63-6.566c.557-.557 1.055-.978 1.491-1.263.439-.286.812-.429 1.117-.429.23 0 .394.087.49.261.098.175.146.467.146.877v.345h.004z"/%3E%3C/svg%3E%0A');
background-position: center;
background-repeat: no-repeat;
background-size: 10px;
border-radius: $form-control-border-radius;
content: '';
display: inline-block;
height: 22px;
margin-right: 14px;
vertical-align: top;
width: 22px;
}
}
}
.mailpoet-premium-three-columns-two-orphans {
@include respond-to(not-small-screen) {
grid-template-columns: repeat(6, 1fr);
> div {
grid-column: span 2;
}
> div:last-child:nth-child(3n - 1) {
grid-column-end: -2;
}
> div:nth-last-child(2):nth-child(3n + 1) {
grid-column-end: 4;
}
}
}
.mailpoet-premium-page-options-label-wrap {
height: 3em;
}
.mailpoet-premium-feature-list-heading {
align-self: flex-start;
color: $color-secondary;
margin-bottom: 0;
}
.mailpoet-premium-page-options-label {
background: $color-tertiary;
border-radius: 0 2px 2px 0;
color: $color-white;
font-weight: bold;
left: 12px;
margin-bottom: $grid-gap;
padding: 2px 12px;
position: relative;
&:before {
background: $color-secondary-middle;
border-left: 12px solid $color-secondary;
border-radius: 2px 0 0 2px;
content: '';
height: 100%;
left: -24px;
position: absolute;
top: 0;
width: 12px;
}
}
.mailpoet-premium-page-options-divider {
flex-grow: 100;
}
.mailpoet-premium-page-our-agency-license {
align-items: center;
grid-template-columns: 3fr 2fr;
}
.mailpoet-premium-page-footer-image {
padding-bottom: 35%;
width: 100%;
}
.mailpoet-premium-page-footer-image img {
bottom: 0;
left: -20px;
position: absolute;
right: 0;
width: calc(100% + 20px);
&:before {
content: '';
display: block;
height: 1000px;
width: 100%;
}
}

View File

@@ -68,43 +68,53 @@
.mailpoet-tiers-page-content__tier {
align-items: flex-start;
background: #fff;
border-bottom: 1px solid $color-gutenberg-grey-200;
border-left: 1px solid $color-gutenberg-grey-200;
border-radius: 4px 0 0 4px;
border-top: 1px solid $color-gutenberg-grey-200;
border: 1px solid $color-gutenberg-grey-200;
border-radius: 4px 4px 0 0;
display: flex;
flex: 1 0 0;
flex-direction: column;
gap: 24px;
height: 42.75rem;
min-height: 600px;
padding: 24px;
@include respond-to(small-screen) {
border: 1px solid $color-gutenberg-grey-200;
border-radius: 0;
flex-basis: auto;
min-height: 0 !important;
}
&:first-child {
border-radius: 4px 0 0 4px;
border-right-width: 0;
@include respond-to(small-screen) {
border-bottom-width: 0;
border-radius: 4px 4px 0 0;
border-right-width: 1px;
}
}
&:last-child {
border-left-width: 0;
border-radius: 0 4px 4px 0;
@include respond-to(small-screen) {
border-left-width: 1px;
border-radius: 0 0 4px 4px;
border-top-width: 0;
}
}
&.popular {
background: #fffaf2;
border: 1px solid #ffe9cc;
height: 45.75rem;
min-height: 648px;
}
.components-button {
align-self: stretch;
font-size: 0.8125rem;
justify-content: center;
&:disabled {
background: $color-gutenberg-grey-100;
color: $color-gutenberg-grey-600;
gap: 4px;
opacity: 1;
padding-left: 8px;
svg {
fill: none;
}
}
}
p {
@@ -122,77 +132,32 @@
padding-inline-start: 24px;
li {
list-style-image: url('../../img/upgrade/plus.svg');
list-style-type: none;
margin-bottom: 8px;
position: relative;
.tp-wrapper {
position: relative;
}
em {
font-style: normal;
text-decoration: underline dotted $color-gutenberg-grey-600;
text-underline-offset: 3px;
}
[role='tooltip'] {
background-color: $color-gutenberg-grey-900;
border-radius: 2px;
bottom: 100%;
color: $color-white;
font-size: 0.6875rem;
left: -4px;
line-height: 1rem;
padding: 3px 6px;
&:before {
background: url('../../img/upgrade/check.svg') no-repeat;
background-size: contain;
content: '';
height: 20px;
left: -24px;
position: absolute;
right: 16px;
visibility: hidden;
p {
color: $color-white;
font-size: 0.6875rem;
line-height: 1rem;
}
}
[role='tooltip']:has(+ .tp-trigger:hover),
[role='tooltip']:has(+ .tp-trigger:focus) {
visibility: visible;
top: 2px;
width: 20px;
}
}
&.free {
li {
list-style-image: url('../../img/upgrade/check.svg');
}
&.free li:before {
background-image: url('../../img/upgrade/check.svg');
}
&.business {
li {
list-style-image: url('../../img/upgrade/plus-orange.svg');
}
&.business li:before {
background-image: url('../../img/upgrade/plus-orange.svg');
}
}
}
.mailpoet-tiers-page-price-divider {
align-items: center;
align-self: stretch;
display: flex;
flex-direction: column;
flex-shrink: 0;
gap: 8px;
height: 36px;
justify-content: center;
hr {
background: $color-gutenberg-grey-200;
border: none;
height: 1px;
margin: 0;
width: 100%;
}
}
.mailpoet-tiers-page-label {
align-items: flex-start;
background: #f16618;
@@ -207,7 +172,7 @@
color: #fff;
font-size: 0.75rem;
gap: 8px;
line-height: 1.333;
line-height: 16px;
}
.mailpoet-tiers-page-tier-header {
@@ -218,6 +183,10 @@
gap: 8px;
min-height: 7.5rem;
@include respond-to(small-screen) {
min-height: 0;
}
p {
color: $color-gutenberg-grey-900;
font-size: 1rem;
@@ -242,20 +211,22 @@
}
.mailpoet-tiers-page-tier-header__icon {
background-position: -4px -4px;
background-repeat: no-repeat;
background-size: contain;
background-size: 48px 48px;
height: 40px;
&.free {
background-image: url('../../img/upgrade/1-starter-plan.svg');
width: 30.44px;
width: 40px;
&.starter {
background-image: url('../../img/upgrade/starter.svg');
}
&.basic {
background-image: url('../../img/upgrade/2-tier-1-plan.svg');
width: 40.37px;
&.business {
background-image: url('../../img/upgrade/business.svg');
}
&.pro {
background-image: url('../../img/upgrade/3-business-plan.svg');
width: 30.44px;
&.agency {
background-image: url('../../img/upgrade/agency.svg');
}
}
@@ -308,23 +279,23 @@
}
}
}
#mailpoet-pro-monthly-price,
#mailpoet-basic-monthly-price {
#mailpoet-agency-monthly-price,
#mailpoet-business-monthly-price {
display: block;
}
#mailpoet-pro-yearly-price,
#mailpoet-basic-yearly-price {
#mailpoet-agency-yearly-price,
#mailpoet-business-yearly-price {
display: none;
}
}
.mailpoet-tiers-page:has(#pricing_duration:checked) {
.mailpoet-tiers-page-tier-price #mailpoet-pro-monthly-price,
.mailpoet-tiers-page-tier-price #mailpoet-basic-monthly-price {
.mailpoet-tiers-page-tier-price #mailpoet-agency-monthly-price,
.mailpoet-tiers-page-tier-price #mailpoet-business-monthly-price {
display: none;
}
.mailpoet-tiers-page-tier-price #mailpoet-pro-yearly-price,
.mailpoet-tiers-page-tier-price #mailpoet-basic-yearly-price {
.mailpoet-tiers-page-tier-price #mailpoet-agency-yearly-price,
.mailpoet-tiers-page-tier-price #mailpoet-business-yearly-price {
display: block;
}
}

View File

@@ -165,8 +165,3 @@ ul.sending-method-benefits {
.mailpoet-verify-key-button {
height: 36px;
}
.mailpoet-premium-key-toggle {
height: 34px;
padding: 0 10px !important;
}

View File

@@ -1,77 +1,38 @@
.mailpoet-categories {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
line-height: 16px;
list-style: none;
margin: 0;
padding: $grid-gap 0 1px; // 1px to prevent https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Mastering_margin_collapsing
row-gap: $grid-gap;
}
.mailpoet-categories-item {
color: $color-text-light;
font-size: $font-size;
margin-bottom: $grid-gap;
padding-bottom: $grid-gap;
text-decoration: none;
&:hover,
&:focus {
box-shadow: none;
color: $color-text-light-hover;
.mailpoet-templates-tab-panel,
.mailpoet-filter-tab-panel,
.mailpoet-categories,
.mailpoet-tabs {
.components-tab-panel__tabs {
box-shadow: inset 0 -1px 0 0 #dcdcde;
flex-wrap: wrap;
}
&.active {
color: $color-secondary;
font-weight: bold;
.components-tab-panel__tabs-item {
&:focus {
box-shadow: none;
}
&.is-active {
box-shadow: inset 0 -4px 0 0 var(--wp-admin-theme-color);
&:focus-visible {
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus)
var(--wp-admin-theme-color);
}
}
&:focus-visible {
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus)
var(--wp-admin-theme-color);
}
}
+ .mailpoet-categories-item {
margin-left: $grid-gap-large;
}
}
.mailpoet-categories-title {
display: inline-block;
position: relative;
vertical-align: top;
// Hack so the text is not jumping when changed to bold when active
&:before {
content: attr(data-title);
display: block;
font-weight: bold;
height: 0;
overflow: hidden;
visibility: hidden;
}
.mailpoet-categories-item.active &:after {
background: $color-secondary;
border-radius: 2px;
content: '';
height: 4px;
left: 0;
margin-top: 5px;
position: absolute;
top: 100%;
width: 100%;
}
}
.mailpoet-categories-count {
background-color: $color-tertiary-light;
border-radius: 8px;
display: inline-block;
font-size: $font-size-extra-small;
font-weight: 600;
line-height: 16px;
margin-left: $grid-gap-half;
padding: 0 6px;
vertical-align: top;
.mailpoet-categories-item.active & {
background-color: $color-secondary-light;
.count {
background-color: #f0f0f1;
border-radius: 12px;
font-size: 11px;
font-weight: 400;
margin-left: 6px;
padding: 2px 5px;
}
}

View File

@@ -1,110 +1,29 @@
.mailpoet-tabs {
clear: both;
position: relative;
z-index: 1;
.mailpoet-tabs > .components-tab-panel__tabs {
box-shadow: none;
margin-top: $grid-gap-half;
#screen-meta-links ~ .wrap .mailpoet-top-bar ~ & {
top: -20px;
}
.components-tab-panel__tabs-item {
border: 1px solid transparent;
border-bottom: none;
box-shadow: none;
.notice ~ &,
.notice ~ div > &,
.notice ~ .wrap &,
.error ~ &,
.error ~ div > &,
.error ~ .wrap &,
.mailpoet-subscribers-in-plan ~ &,
#mailpoet_notices:not(:empty) ~ div > & {
top: 0 !important;
}
@include respond-to(small-screen) {
top: 0 !important;
}
}
.mailpoet-tabs-is-open {
z-index: 2;
&:after {
background: rgba(30, 36, 40, 0.1);
content: '';
height: 100%;
left: 0;
position: absolute;
top: 0;
width: 100%;
z-index: 1;
}
}
.mailpoet-tab,
.mailpoet-tabs-title {
align-items: center;
background: none;
border: 1px solid transparent;
border-bottom: 0;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
box-sizing: border-box;
color: $color-heading;
cursor: pointer;
display: inline-flex;
font-size: $font-size;
justify-content: center;
line-height: 24px;
margin-bottom: -1px;
max-width: 100%;
min-height: 56px;
padding: $grid-gap-half $grid-gap-medium;
position: relative;
text-align: center;
text-decoration: none;
vertical-align: top;
&:focus {
outline: none;
}
&.mailpoet-tab-active {
background: $color-white;
border-color: $color-tertiary-light;
color: $color-secondary;
font-weight: 600;
}
svg {
fill: currentColor;
height: 16px;
width: 16px;
&:first-child {
margin-right: 6px;
&:after {
background: #fff;
bottom: -1px;
box-shadow: none;
transition: none;
}
&:last-child {
margin-left: 6px;
}
&.is-active {
background-color: #fff;
border-color: #dcdcde;
box-shadow: none;
&:only-child {
margin-left: 0;
margin-right: 0;
&:focus-visible {
box-shadow: none;
}
}
}
// Hack so the text is not jumping when changed to bold when active
> span:before {
content: attr(data-title);
display: block;
font-weight: bold;
height: 0;
overflow: hidden;
visibility: hidden;
}
}
.mailpoet-tabs-title {
display: none;
}
.mailpoet-tab-content {
@@ -122,37 +41,6 @@
}
@include respond-to(small-screen) {
.mailpoet-tabs {
margin-left: -10px;
margin-right: -12px;
}
.mailpoet-tabs-title {
background: $color-white;
border: 1px solid $color-tertiary-light;
border-bottom: none;
border-radius: 0;
display: flex;
font-weight: bold;
justify-content: flex-start;
margin-bottom: 0;
width: 100%;
z-index: 2;
&:after {
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%231d2327' d='M10 0H2c-.552 0-1 .448-1 1 0 .216.07.427.2.6l4 5.333c.331.442.958.532 1.4.2.076-.057.143-.124.2-.2l4-5.333c.331-.442.242-1.069-.2-1.4-.173-.13-.384-.2-.6-.2z'/%3E%3C/svg%3E%0A")
no-repeat center;
content: '';
height: 8px;
margin-left: auto;
width: 12px;
}
.mailpoet-tabs-is-open > &:after {
transform: rotate(180deg);
}
}
.mailpoet-tab {
background: $color-white;
border: 1px solid $color-tertiary-light;
@@ -161,19 +49,6 @@
width: 100%;
}
.mailpoet-tabs-wrapper {
display: none;
left: 0;
position: absolute;
top: 56px;
width: 100%;
z-index: 2;
.mailpoet-tabs-is-open > & {
display: block;
}
}
.mailpoet-tab-content {
border-radius: 0;
padding-top: 0;

View File

@@ -31,9 +31,10 @@
top: 2px;
z-index: 1;
svg {
max-height: 100%;
max-width: 100%;
svg,
img {
height: 23px;
width: 75px;
}
}
@@ -42,26 +43,6 @@
}
}
.mailpoet-top-bar-logo-desktop {
display: block;
height: 23px;
width: 75px;
@include respond-to(small-screen) {
display: none;
}
}
.mailpoet-top-bar-logo-mobile {
display: none;
height: 40px;
width: 39px;
@include respond-to(small-screen) {
display: block;
}
}
.mailpoet-top-bar-children {
margin-left: $grid-gap;

View File

@@ -3,14 +3,16 @@
border: 1px solid $color-input-border !important;
border-radius: $form-control-border-radius !important;
box-sizing: border-box;
display: flex;
max-width: 100%;
min-height: $form-control-height;
min-width: 0;
width: $grid-column;
// To align the left padding with the other inputs
input[type='text'].components-form-token-field__input {
line-height: 16px;
margin-left: 0;
min-height: 30px;
min-height: 24px;
padding-left: 8px;
}
// For better fit when the last item is active

View File

@@ -1,5 +1,6 @@
.mailpoet-flex {
display: flex;
gap: $grid-gap;
}
.mailpoet-flex-grow {

View File

@@ -5,32 +5,6 @@
box-sizing: border-box;
}
.mailpoet-segment-subscriber-count {
align-items: center;
display: flex;
font-size: 13px;
gap: 16px;
padding-top: 8px;
.mailpoet-segment-help-icon {
display: flex;
}
.mailpoet-segment-subscriber-count-message {
align-items: center;
display: flex;
font-size: 14px;
}
.mailpoet-segment-subscriber-cache {
color: $color-text-light;
}
.components-button.is-link {
text-decoration: none;
}
}
.mailpoet-confirm-dialog {
max-width: 600px;
}

View File

@@ -40,6 +40,7 @@
@import 'components-editor/content-blocks/container';
@import 'components-editor/content-blocks/abandoned-cart-content';
@import 'components-editor/content-blocks/automated-latest-content';
@import 'components-editor/content-blocks/dynamic-products';
@import 'components-editor/content-blocks/posts';
@import 'components-editor/content-blocks/products';
@import 'components-editor/content-blocks/button';

View File

@@ -15,39 +15,7 @@
background-color: #fff;
border: 1px solid #dcdcde;
border-radius: 2px;
margin-top: 16px;
.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;
border-radius: 12px;
font-size: 11px;
font-weight: 400;
margin-left: 6px;
padding: 2px 5px;
}
margin-top: $grid-gap-half;
}
.mailpoet-listing-card.woocommerce-table {

View File

@@ -78,7 +78,6 @@
@import 'components-plugin/pages';
@import 'components-plugin/pages-custom';
@import 'components-plugin/premium-tiers-hero-sections';
@import 'components-plugin/premium-page';
@import 'components-plugin/premium-tiers-page';
@import 'components-plugin/mp-toggle';
@import 'components-plugin/menu';

View File

@@ -8,8 +8,13 @@
background-color: #e5e5e8;
font-size: 11px;
font-weight: normal;
margin: 2px 0 2px 10px;
width: 26px;
height: auto;
line-height: 1.4;
margin-left: 6px;
min-height: 0;
min-width: 0;
padding: 2px 5px;
width: auto;
}
}

View File

@@ -20,8 +20,8 @@ $color-primary-highlight: #1e8cbe;
$color-primary-inactive: #a4a4a4;
$color-primary-shadow-inset: #025c80;
$color-primary-text: #656565;
$color-secondary: #ff5301;
$color-secondary-hover: darken($color-secondary, 10%);
$color-secondary: var(--wp-admin-theme-color);
$color-secondary-hover: var(--wp-admin-theme-color-darker-20);
$color-secondary-middle: #f5a278;
$color-secondary-middle-hover: darken($color-secondary-middle, 10%);
$color-secondary-light: #ffe0d0;

View File

@@ -1,5 +1,5 @@
$gutenberg-control-border-color: #7e8993;
$gutenberg-control-active-color: #ff5301;
$gutenberg-control-active-color: $color-secondary;
$gutenberg-control-border-color-focus: #007cba;
$selection-item-base-color: $color-tertiary-light;
$selection-item-text-color: #23282d;

Binary file not shown.

After

Width:  |  Height:  |  Size: 451 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 495 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 500 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 517 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 560 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 543 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 396 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 550 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 604 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 583 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 307 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 384 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 789 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 B