Commit Graph

746 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 Jakes
e3f7caea14 Avoid ignoring PHPCS checks in automation storages
[MAILPOET-6150]
2024-08-29 17:23:34 +02:00
Jan Jakes
9ab5c928de Remove deprecated parameters (reported by WPCS)
[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ý
9f87b1c18b Add comments to the WPDB queries in Automation Storages
[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
Jan Jakes
c8e6c02851 Fix "Return value must be of type int, null returned" in Action Scheduler wrappers
[MAILPOET-6179]
2024-08-05 20:35:32 +03:00
 Ján Mikláš
2e13570dd7 Correctly complete automation run when there is an empty branch in if/else
[MAILPOET-6154]
2024-07-29 15:03:47 +02:00
Jan Jakes
b7cee657c7 When unscheduling automation run actions, cancel related runs
[MAILPOET-6131]
2024-07-10 12:56:52 +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
Pavel Dohnal
e51c20221a Only clear action if deactivating an automation
[MAILPOET-5982]
2024-06-26 11:22:45 +02:00
Pavel Dohnal
4b14ae26cb Use a constant instead of string
[MAILPOET-5982]
2024-06-26 11:22:45 +02:00
Pavel Dohnal
1f8edf666a Deactivate automations runs when deactivating automation
[MAILPOET-5982]
2024-06-26 11:22:45 +02:00
Jan Jakes
7e87842eeb Fix typo in exception message
[MAILPOET-4977]
2024-05-06 12:39:00 +02:00
Jan Jakes
f71993dde9 Cancel scheduled progress runs when executed manually
[MAILPOET-4977]
2024-05-06 12:39:00 +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
fa6b380266 Add controller with ability to execute automation step progress manually
[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
7eb17c9e09 Ensure automation progress runs log data also at their start
[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