Currently, WooCommerce Subscriptions doesn't support WooCommerce Custom
Orders Table, so we want to skip all WooCommerce Subscriptions related
tests when Woo COT is enabled.
[MAILPOET-4695]
This commit changes the Codeception extension CheckSkippedTestsExtension
that we use to generate an error when tests are skipped in the `trunk` and
`release` branches. Now this extension accepts a list of tests that can
be skipped in those two branches. This will be necessary as part of the
project to support WooCommerce Custom Orders Tables as in some scenarios
we want to skip WooCommerce Subscriptions tests and in some we don't.
For now, WooCommerce Subscrptions doesn't support Woo COT, so we want to
run Woo Subscriptions tests when COT is disabled, but we want to skip
then when COT is enabled.
The main change is that now we are using the `TEST_SKIPPED` Codeception event
instead of the `SUITE_AFTER` event. This change was necessary as in the
latter event we don't have any information about the tests that were
skipped.
[MAILPOET-4695]
When no corresponding newsletter was found the task can be deleted. The behavior
before meant that such a task would remain forever in the database with the
status 'running'.
[MAILPOET-4699]
Sometimes errors overlap each other so that the 'Last Seen error' we log
does not provide sufficient information on the cause of a problem.
E.g. one worker might cause an SQL issue, which closes the EntityManager and a
subsequent worker might overwrite this error with the information that the
EntityManager is closed.
With this commit, both those issues will be logged as an error.
[MAILPOET-4699]
This commit deprecates the filter
mailpoet_sending_newsletter_render_after and replaces it with
mailpoet_sending_newsletter_render_after_pre_process. This was necessary
because as part of a Doctrine refactor one of the parameters passed to
the old filter changed from a Newsletter model to a Newsletter entity.
[MAILPOET-4680]
The latest version development build of WooCommerce contains a change
that modified the method that should be called to enable Woo Custom
Orders Tables (see this Woo PR for more information:
https://github.com/woocommerce/woocommerce/pull/34727. This commit
update the plugin that we use in the acceptance and integration tests to
reflect this change.
[MAILPOET-4691]
This commit changes
\MailPoet\Segments\WooCommerce::insertSubscriberFromOrder() to use
WooCommerce method instead of querying the database directly. This is
needed as WooCommerce is moving away from WP tables and creating its own
tables.
[MAILPOET-4570]
We want to use real WooCommerce code instead of mocks for the tests that
are part of the woo test group and this change is necessary for a
subsequent commit that will modify
\MailPoet\Segments\WooCommerce::insertSubscriberFromOrder().
[MAILPOET-4570]