Commit Graph

353 Commits

Author SHA1 Message Date
Jan Jakes
fe4eeb0049 Fix send email step time-out happening too early
This was an off-by-one error — the first step run is the email scheduling run.

[MAILPOET-6246]
2024-09-23 13:00:48 +02:00
Jan Jakes
89b10e7504 Avoid ignoring PHPCS checks in automation field factories
[MAILPOET-6150]
2024-08-29 17:23:34 +02:00
Jan Lysý
c6caee6f7a Add comments to the WPDB queries in Automation Integrations
[MAILPOET-6150]
2024-08-29 17:23:34 +02:00
Jan Lysý
6b5fb2e92d Make all error messages translatable
[MAILPOET-6174]
2024-08-21 15:15:21 +02:00
Jan Lysý
50a00789b8 Add setting error message when email is missing
[MAILPOET-6174]
2024-08-21 15:15:21 +02:00
Jan Lysý
ecf0e1d2db Update error message in SendEmailAction
[MAILPOET-6174]
2024-08-21 15:15:21 +02:00
Jan Lysý
0761998eba Use typed properties in SendEmailAction
[MAILPOET-6174]
2024-08-21 15:15:21 +02:00
Jan Lysý
54043e5364 Update error messages in automations
[MAILPOET-6174]
2024-08-21 15:15:21 +02:00
Jan Jakes
172ffb7b61 Increase number of checks if the email was sent in automation
[MAILPOET-6175]
2024-08-12 16:11:19 +02:00
Jan Jakes
2b38eb35ef Minimize the risk of race conditions for "once per subscriber" automations
[MAILPOET-6177]
2024-08-12 12:25:42 +02:00
Rostislav Wolny
8a0bd75cb1 Limit scheduled tasks fetching by automation run createdAt
This is a performance optimization to avoid fetching too many scheduled task rows.
Run is always created before the scheduled task which is created in send action step.
[MAILPOET-6155]
2024-08-07 16:01:48 +02:00
Rostislav Wolny
e5ab65f28e Fix send action checkSendingStatus to support multiple emails per subscriber.
It is possible that one email (e.g., purchase in category) is sent multiple times
to the same subscriber.

AutomationEmailScheduler::getScheduledTaskSubscriber was selecting the task based on subscriber and newsletter.
In the case of multiple emails sent to one subscriber, the method failed to pick ScheduledTaskSubsrciberEntity because
the query was fetching multiple results, but getOneOrNullResult expects only one result.

This commit fixes it by adding additional filtering by $runId to get the ScheduledTaskSubsriberEntity associated
with the correct run.

I did the filtering in PHP because an alternative would be using LIKE %% in the query. The meta column is text.
[MAILPOET-6155]
2024-08-07 16:01:48 +02:00
 Ján Mikláš
ac751871f9 Unify automation endpoint 404 exceptions
[MAILPOET-5436]
2024-07-08 14:37:30 +02:00
 Ján Mikláš
ba79200f55 Show time left in activity modal for Delay action
[MAILPOET-5436]
2024-07-08 14:37:30 +02:00
Jan Jakes
fdc0468c64 Execute send email step progress when email is sent
[MAILPOET-4977]
2024-05-06 12:39:00 +02:00
Jan Jakes
36089cc2f4 Save automation run info to scheduled task meta field
[MAILPOET-4977]
2024-05-06 12:39:00 +02:00
Jan Jakes
123b0d65e2 Do not complete send email action run immediately, schedule a check instead
[MAILPOET-4977]
2024-05-06 12:39:00 +02:00
Jan Jakes
9de62db7df Add number of required automation steps to templates
[MAILPOET-6002]
2024-05-01 12:26:09 +02:00
Jan Jakes
575ce3cc5c Move purchased templates to the free plugin
[MAILPOET-6002]
2024-05-01 12:26:09 +02:00
Jan Jakes
3a5f108e42 Change free-only templates to default
[MAILPOET-6002]
2024-05-01 12:26:09 +02:00
David Remer
cbed9d49fc Rename abandoned cart trigger
[MAILPOET-6015]
2024-04-29 11:08:53 +02:00
David Remer
5aa6ffaed7 Make more triggers transactional
[MAILPOET-6015]
2024-04-29 11:08:53 +02:00
Jan Jakes
7dd1cd213b Cast args to expected types to catch type errors in the future
[MAILPOET-6000]
2024-04-08 12:55:54 +02:00
Jan Jakes
677c6f22ee Fix loading order in customer payload for guest users
We were passing order ID istead of the order itself for guest users.

[MAILPOET-6000]
2024-04-08 12:55:54 +02:00
Mike Jolley
435f638011 Apply rules on lib dir 2024-03-21 16:57:59 +01:00
Jan Jakes
7df37c88f6 Apply "in the last X" parameter to fields backfilled from orders for guests
[PREMIUM-253]
2024-03-18 13:36:08 +01:00
Jan Jakes
29083b1f0f Ensure expected field types in customer payload
[PREMIUM-253]
2024-03-18 13:36:08 +01:00
Jan Jakes
efb56c7469 Pass order ID to customer subject from order-related triggers
[PREMIUM-253]
2024-03-18 13:36:08 +01:00
Jan Jakes
e054d455d4 Pass order to customer payload when available
[PREMIUM-253]
2024-03-18 13:36:08 +01:00
Jan Jakes
516d719111 Fallback on order categories/tags in order fields
[MAILPOET-5378]
2024-03-18 13:36:08 +01:00
Jan Jakes
4b1027fcc7 Fallback on order date in first/last order date fields
[MAILPOET-5378]
2024-03-18 13:36:08 +01:00
Jan Jakes
bae1f44378 Use the new getters in field value factories
[MAILPOET-5378]
2024-03-18 13:36:08 +01:00
Jan Jakes
950747a15f Add getters for total spent, average spent, and order count with order fallback
[MAILPOET-5378]
2024-03-18 13:36:08 +01:00
Jan Jakes
b6c81f8ff6 Add getters for billing & shipping customer data with order fallback
[MAILPOET-5378]
2024-03-18 13:36:08 +01:00
Jan Jakes
adb5d16fab Allow optional WC_Order to customer payload for guest user data
[MAILPOET-5378]
2024-03-18 13:36:08 +01:00
Jan Jakes
8ba4335dfb Optimize and cache term loading
[MAILPOET-5942]
2024-03-18 11:53:16 +01:00
Jan Jakes
eaee987048 Implement cart total field
[MAILPOET-5934]
2024-03-14 11:09:12 +01:00
Jan Jakes
7560aa495e Unify quotes and apostrophes
[MAILPOET-5934]
2024-03-14 11:09:12 +01:00
Jan Jakes
4674c1443d Use order completed trigger instead of status change
[MAILPOET-5934]
2024-03-14 11:09:12 +01:00
Jan Jakes
261907e93b Add missing translation functions
[MAILPOET-5934]
2024-03-14 11:09:12 +01:00
Jan Jakes
ad1ffea2c0 Enable abandoned cart campaign template
[MAILPOET-5934]
2024-03-14 11:09:12 +01:00
Jan Jakes
9be4e730c0 Add win-back customers template
[MAILPOET-5934]
2024-03-14 11:09:12 +01:00
Jan Jakes
d816e97d31 Enable thank loyal customers template, improve naming
[MAILPOET-5934]
2024-03-14 11:09:12 +01:00
David Remer
1a753ca2af Order explicitly by name
[MAILPOET-5942]
2024-03-12 14:27:21 +01:00
Jan Jakes
9327485441 Use "comment_date_gmt" for "in the last" condition
[PREMIUM-253]
2024-03-11 10:31:15 +01:00
Jan Jakes
b5b21c9f7a Add check for product post type when fetching customer review data
[PREMIUM-253]
2024-03-11 10:31:15 +01:00
Jan Jakes
46a462ee23 Add test for an automation with if/else step and "in the last X days" filter
[PREMIUM-253]
2024-03-11 10:31:15 +01:00
Jan Jakes
5439db1e5a Unify parameter naming
[PREMIUM-253]
2024-03-11 10:31:15 +01:00
Jan Jakes
1a0eb90402 Mark which fields support the "in the last" parameter for UI
[PREMIUM-253]
2024-03-11 10:31:15 +01:00
Jan Jakes
5f7362282d Add "in the last" parameter and schema to number and enum filters
[PREMIUM-253]
2024-03-11 10:31:15 +01:00