We don't want to run any actions during migrations.
This will also clean duplicate trigger actions
that were potentially created because of requests race conditions.
[MAILPOET-4684]
This commit adds the required code to display the invisible ReCaptcha in
the frontend when a form is rendered and this type of captcha is
selected in the admin.
[MAILPOET-4145]
We already have a specific test for the newsletter validator to check
for the missing unsubscribe link case. All we really care about for the
sending queue is that it rejects newsletters that are considered invalid
for any reason.
MAILPOET-4236
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]
The only thing Security::generateToken was providing was a default value
for the $action, which created a pattern of using the same $action
everywhere, which may not be the best way to go.
Since it was essentially a wrapper for WP's built-in nonce functions,
it seemed clearer to use those functions directly to be more explicit
about how we're handling tokens.
[MAILPOET-2030]
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]