Commit Graph

17035 Commits

Author SHA1 Message Date
David Remer
5b35cf84aa Remove Cancel button in newsletter editor
[MAILPOET-4520]
2022-10-11 11:14:58 +02:00
David Remer
e9ecea5605 Switch <div> to <span> to prevent error
div elements should not be children of paragraphs

[MAILPOET-4520]
2022-10-11 11:14:58 +02:00
David Remer
0975365711 Redirect to template page when creating automation email
[MAILPOET-4520]
2022-10-11 11:14:58 +02:00
David Remer
5adb34a6c0 Redirect logo on template page and newsletter editor
[MAILPOET-4520]
2022-10-11 11:14:58 +02:00
David Remer
9134005d30 Add optional prop for onClick action
[MAILPOET-4520]
2022-10-11 11:14:58 +02:00
David Remer
83bc9d8089 Hide tutorial when email is of type automation
[MAILPOET-4520]
2022-10-11 11:14:58 +02:00
Rodrigo Primo
7521dbd1ef Update Woo COT build in test to the latest version
The latest version is 7.0.0-hpos.dev.7

[MAILPOET-4691]
2022-10-11 07:23:37 +02:00
David Remer
bb04935f29 Add repository to testee
[MAILPOET-4708]
2022-10-10 17:13:17 +02:00
David Remer
522629eeff Update other instances where SendingTask and Entity get out of sync
[MAILPOET-4708]
2022-10-10 17:13:17 +02:00
David Remer
2298b5b061 Be more restrictive when deleting a queue task
getNewsletterFromQueue() has too many conditions under which it returns null. Therefore we can not rely on that method when we wont to delete running tasks with no associated newsletter.
[MAILPOET-4708]
2022-10-10 17:13:17 +02:00
David Remer
94da004454 Refresh newsletterEntity and taskEntity.
We need to refresh those, because the database values have
changed and Doctrine needs to clear its internal cache.

[MAILPOET-4708]
2022-10-10 17:13:17 +02:00
David Remer
0a3431b7da Add simple mixpanel data for automations
[MAILPOET-4535]
2022-10-10 09:53:42 +02:00
Rodrigo Primo
50b18834d2 Adapt query to get registered customers to work with custom orders tables
[MAILPOET-4569]
2022-10-10 09:21:38 +02:00
Rodrigo Primo
e3cf1a047b Adapt query to get guest customers to work with custom orders tables
[MAILPOET-4569]
2022-10-10 09:21:38 +02:00
Rodrigo Primo
f2ab875bd9 Skip WooCommerce Subscriptions integration tests when Woo COT is enabled
WooCommerce Subscriptions doesn't support WooCommerce Custom Orders
Tables, so we should skip the WooCommerce Subscriptions related tests
when Woo COT is enabled.

[MAILPOET-4695]
2022-10-07 18:31:10 +02:00
David Remer
b0aacdd4ef Release 3.100.1 2022-10-06 15:37:24 +03:00
Rodrigo Primo
c4c94c2db0 Change the way getName() is called to get rid of a PHPStan error
[MAILPOET-4695]
2022-10-06 12:16:47 +02:00
Rodrigo Primo
7cb6609faa Skip WooCommerce Subscriptions test when Woo COT is enabled
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]
2022-10-06 12:16:47 +02:00
Rodrigo Primo
ef8bc9250a Change codeception extension to catch skipped tests
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]
2022-10-06 12:16:47 +02:00
David Remer
307989a0c6 Delete task when no newsletter was found
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]
2022-10-06 12:06:13 +02:00
David Remer
357dede83d Allow newsletter_id to be NULL in sending_queue table
[MAILPOET-4699]
2022-10-06 12:06:13 +02:00
David Remer
1a8f0c384c Improve logging of errors in cron
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]
2022-10-06 12:06:13 +02:00
Jan Lysý
ccb1e7dc94 Improve ordering in mapping
[MAILPOET-4583]
2022-10-05 14:14:34 +02:00
Jan Lysý
159233f3e5 Remove duplicity from mapping
[MAILPOET-4583]
2022-10-05 14:14:34 +02:00
Jan Lysý
cc8f261629 Add used dynamic filter types into tracking
[MAILPOET-4583]
2022-10-05 14:14:34 +02:00
Jan Lysý
f1b59173dd Add filters into newsletter response
[MAILPOET-4583]
2022-10-05 14:14:34 +02:00
Jan Lysý
6668a87eb3 Add reporting about tags usage
[MAILPOET-4583]
2022-10-05 14:14:34 +02:00
Rodrigo Primo
f734091e34 Replace PHP's builtin exception with Mailpoet's RuntimeException
Use a more specific exception.

[MAILPOET-4577]
2022-10-05 10:47:06 +02:00
Rodrigo Primo
05fb310130 Use different query to get emails and orderds IDs if WooCoomerce COT is enabled
[MAILPOET-4577]
2022-10-05 10:47:06 +02:00
Rodrigo Primo
ff105f8e61 Add helper method to get the name of the WooCommerce orders table
[MAILPOET-4577]
2022-10-05 10:47:06 +02:00
Rodrigo Primo
54ea394f82 Deprecate filter as part of a Doctrine refactor
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]
2022-10-04 14:41:00 +02:00
Rodrigo Primo
d39440f1dc Refactor Newsletter::preProcessNewsletter() to use Doctrine
This commit also removes almost all the usages of the old Newsletter
model from NewsletterTest.

[MAILPOET-4680]
2022-10-04 14:41:00 +02:00
Rodrigo Primo
095cddc67e Change Posts::getAlcPostsCount() to use Doctine instead of Paris
[MAILPOET-4680]
2022-10-04 14:41:00 +02:00
Rodrigo Primo
e4cf6ddb57 Use Subscriber data factory instead of SubscriberEntity
This change is in the context of creating a new subscriber.

Doing this following feedback during PR review.

[MAILPOET-4377]
2022-10-04 14:22:02 +02:00
Rodrigo Primo
7582f3c991 Remove old Segment model from WooCommercePastRevenues
[MAILPOET-4377]
2022-10-04 14:22:02 +02:00
Rodrigo Primo
52d85d7b3d Remove old Newsletter model from WooCommercePastRevenues
[MAILPOET-4377]
2022-10-04 14:22:02 +02:00
Rodrigo Primo
500d70356e Remove old Subscriber model from WooCommercePastRevenues
[MAILPOET-4377]
2022-10-04 14:22:02 +02:00
Rodrigo Primo
d7c1789fe2 Remove old StatisticsNewsletter model from WooCommercePastRevenues
[MAILPOET-4377]
2022-10-04 14:22:02 +02:00
Rodrigo Primo
a105c7c779 Remove old SendingQueue model from WooCommercePastRevenues
[MAILPOET-4377]
2022-10-04 14:22:02 +02:00
Rodrigo Primo
184053d914 Remove old ScheduledTaskSubscriber model from WooCommercePastRevenues
[MAILPOET-4377]
2022-10-04 14:22:02 +02:00
Rodrigo Primo
e56229e3ba Replace all ORM::rawExecute() calls with Doctrine code
[MAILPOET-4377]
2022-10-04 14:22:02 +02:00
Rodrigo Primo
a45ea7e50c Remove old NewsletterSegment model from WooCommercePastRevenues
[MAILPOET-4377]
2022-10-04 14:22:02 +02:00
David Remer
f4c0eebbaa Release 3.100.0 2022-10-04 13:30:22 +03:00
Rodrigo Primo
fa4c4d02d6 Update method to enable WooCommerce Custom Orders Tables
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]
2022-10-04 09:26:11 +02:00
Rodrigo Primo
db0a8bee0f Update Woo COT build in test to the latest version
The latest version is 7.0.0-hpos.dev.4

[MAILPOET-4691]
2022-10-04 09:26:11 +02:00
Rodrigo Primo
8aabcb5857 Use Woo native function instead of custom query in getGuestCustomerOrderCountByEmail()
[MAILPOET-4570]
2022-10-03 15:10:36 +02:00
Rodrigo Primo
a171206da2 Add basic test to cover scheduling first purchase email for guest customer
[MAILPOET-4570]
2022-10-03 15:10:36 +02:00
Rodrigo Primo
7de66934ca Add option to set billing_email when creating test Woo orders
[MAILPOET-4570]
2022-10-03 15:10:36 +02:00
Rodrigo Primo
b592ce743d Use Woo native function instead of custom query in getOrdersCountCreatedBefore()
[MAILPOET-4570]
2022-10-03 15:10:36 +02:00
Rodrigo Primo
54b68712e9 Add basic test to cover the happy path of WooCommerce\Helper::getOrdersCountCreatedBefore()
[MAILPOET-4570]
2022-10-03 15:10:36 +02:00