When users click send email in UI, they need to wait a minute or more to
see some emails started going out.
This commit adds additional trigger into sending queue API.
If emails is set to send it triggers Action Scheduler immediately.
Users will get immediate feedback that emails are sending.
[MAILPOET-4274]
This will poll the server every certain interval (15s) for the email address
and stop polling if the email is Authorized or the modal is closed or after a certain period of time (2 hours)
MAILPOET-4300
Checking the subscriber limit has nothing to do with the newsletter
itself, so it makes more sense to continue to perform that check as
needed elsewhere in the codebase.
MAILPOET-4236
- Rename validator to newsletterValidator for clarity
- Add validation for ALC content
- Refactor tests to use data factory for consistency and to avoid
validation issues
- Add separate tests for NewsletterValidator service
- Add test helper for retrieving service with private properties
overridden by name
[MAILPOET-4236]
This prevents users from activating automatic emails from listing pages
that are not valid.
This also adds more checks for the content of a newsletter, requiring
that a newsletter have at least one content block in order to be valid.
This change makes the server side validation check match what we're
checking in the editor in mailpoet/assets/js/src/newsletter_editor
/components/save.js and mailpoet/assets/js/src/newsletters/send.jsx
[MAILPOET-4236]
This commit removes the method Posts::getTerms() as it existed to add a
compatibility layer for sites running WP < 4.5.0 and we don't support
this version anymore. The signature of the WP get_terms() function was
changed in version 4.5.0 and that is why this compatibility layer was
needed.
The integration test class for this method was also removed. The only
place where this method was used, AutomatedLatestContent::getTerms(),
now call WPFunctions->getTerms() directly. A very basic integration test
was added to cover the happy path of AutomatedLatestContent::getTerms().
[MAILPOET-4225]