Commit Graph

17140 Commits

Author SHA1 Message Date
Rostislav Wolny
8ef1bfaf24 Add acceptance test for homepage basic functionality
[MAILPOET-4825]
2023-01-02 14:13:53 +01:00
Rostislav Wolny
abac8d7147 Move MailerError notice component to notices namespace
[MAILPOET-4825]
2023-01-02 14:13:53 +01:00
Rostislav Wolny
367bcaf233 Refactor MailerError notice props to camel case
[MAILPOET-4825]
2023-01-02 14:13:53 +01:00
Rostislav Wolny
fdbb9428d9 Refactor MailerError notice to Typescript
[MAILPOET-4825]
2023-01-02 14:13:53 +01:00
Rostislav Wolny
bd047a0108 Automatically hide MailerError notice after resuming sending
[MAILPOET-4825]
2023-01-02 14:13:53 +01:00
Rostislav Wolny
05202d572f Add Mailer Error notice to homepage
This commit reuses the MailerError component to render important errors related to issues in sending.

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

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

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

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

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

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

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

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

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

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

[MAILPOET-4815]
2022-12-19 21:37:42 +01:00