Commit Graph

100 Commits

Author SHA1 Message Date
d1f77d3ee5 Add lookup data retrieval for subscribed to list
MAILPOET-5625
2023-10-13 11:21:42 +02:00
af9a6cbb67 Add lookup data retrieval for subscribed via form
MAILPOET-5625
2023-10-13 11:21:42 +02:00
40785d047e Add lookup data retrieval for custom fields
MAILPOET-5625
2023-10-13 11:21:42 +02:00
6da760e754 Add lookup data filter to subscriber tag
MAILPOET-5625
2023-10-13 11:21:42 +02:00
beda4f8d89 Add lookup data retrieval for email filters
MAILPOET-5625
2023-10-13 11:21:42 +02:00
984aa81f86 Add lookup data retrieval for automation filters
MAILPOET-5625
2023-10-13 11:21:42 +02:00
12362c0399 Update filter interface for lookup data
This method is intended to store the actual names of things that might
change or be deleted in the future, so we can include accurate
information when showing what the snapshot of the filter was at the time
.

MAILPOET-5625
2023-10-13 11:21:42 +02:00
00b33c2825 Change the length of the random string appended to segments
This commit changes the length of the random string appended to segments
created from a template when a segment with the same name already
exists. Before the length was 12 and now it is 5. We don't need a very
long random string in this case, and the shorter the string the less
ugly it is.

[MAILPOET-5394]
2023-09-18 14:43:49 +02:00
f806b3362c Add a random string when creating a segment if the name already exists
This ensures that it is possible to create multiple segments from the
same template.

[MAILPOET-5394]
2023-09-18 14:43:49 +02:00
7a6cc36718 Include timeframe in migration to avoid BC code
MAILPOET-5496
2023-08-17 13:49:08 +02:00
8d03db5dcc Add lifetime option to payment/shipping filters
MAILPOET-5496
2023-08-17 13:49:08 +02:00
adc052fc55 Add coupon code filter to mapper/factory
MAILPOET-5007
2023-08-14 13:49:55 +02:00
a446a13354 Add backend logic for used coupon code filter
MAILPOET-5007
2023-08-14 13:49:55 +02:00
d7e283dea9 Handle empty strings as blank in custom fields
MAILPOET-4996
2023-08-07 12:03:49 +02:00
a7d260ac2e Refactor strings to constants/enums
MAILPOET-4996
2023-08-07 12:03:49 +02:00
fe318f5a30 Add 'not contains' option for text custom fields
MAILPOET-4996
2023-08-07 12:03:49 +02:00
a1b51aecf0 Update backend logic to support (not)blank
MAILPOET-4996
2023-08-07 12:03:49 +02:00
ce9cbdc45d Add backend logic for number of reviews filter
MAILPOET-5413
2023-08-07 11:06:27 +02:00
27e346eed0 Fetch action directly from filter data
This fixes an issue where pre-existing subscribedDate filters were
causing errors because they didn't have an `action` stored in their
serialized data.

It was never necessary to store the action redundantly in the serialized
 filter data in the first place, so we're now fetching the action
 directly from the filter data entity itself.

MAILPOET-5500
2023-08-02 22:46:18 +02:00
5eeee574b2 Extract strings to constants
MAILPOET-4991
2023-07-30 19:20:09 +02:00
feb0297fb9 Implement lifetime option for total spent
MAILPOET-4991
2023-07-30 19:20:09 +02:00
d04c84d6d4 Implement lifetime option for number of orders
MAILPOET-4991
2023-07-30 19:20:09 +02:00
64094387eb Implement lifetime option for average spent filter
MAILPOET-4991
2023-07-30 19:20:09 +02:00
14a2603ac3 Implement lifetime option for email opens
MAILPOET-4991
2023-07-30 19:20:09 +02:00
25a4515ebb Default days to 0 for allTime timeframe
MAILPOET-4991
2023-07-30 19:20:09 +02:00
0e6c885ad1 Ensure filter mapper always includes timeframe
MAILPOET-4991
2023-07-30 19:20:09 +02:00
941675bdde Remove unused variable
MAILPOET-4989
2023-07-26 10:53:55 +02:00
fea8db19bc Remove nullability for constructor params
MAILPOET-4989
2023-07-26 10:53:55 +02:00
4d5b4885fe Revert valid operator methods back to instance methods
MAILPOET-4989
2023-07-26 10:53:55 +02:00
8de46db560 Add note about the different naming format
The subscribedDate filter used to be completely separate and it's now
been consolidated into SubscriberDateField. Since existing filters exist
 in the wild that have the subscribedDate type, we're not able to
 update the value to be consistent with the other types.

MAILPOET-4989
2023-07-26 10:53:55 +02:00
edbb40ee42 Add last sending date filter
MAILPOET-4989
2023-07-26 10:53:55 +02:00
3ded9be927 Refactor subscribedDate filter to use SubscriberDateField
MAILPOET-4989
2023-07-26 10:53:55 +02:00
f27f469b17 Add backend logic for subscriber date filters
MAILPOET-4989
2023-07-26 10:53:55 +02:00
7db7e78c71 Add backend logic for onOr(Before|After) filters
MAILPOET-5012
2023-07-19 16:06:19 +02:00
9a218a706b Refactor single order value and total spent to use DaysPeriodField
This commit refactors the React components SingleOrderValueFields and
TotalSpentFields to use the new DaysPeriodField component instead of
its own code to generate the days period selector.

[MAILPOET-4991]
2023-07-19 15:24:46 +02:00
8a2c435b9c Refactor average spent and # of orders to use DaysPeriodField
This commit refactors the React components AverageSpentFields and
NumberOfOrdersFields to use the new DaysPeriodField component instead of
a its own code to generate the days period selector.

[MAILPOET-4991]
2023-07-19 15:24:46 +02:00
251dcdc6fb Add filters for automations events
MAILPOET-5003
2023-07-12 11:10:18 +02:00
841745c706 Remove shipping method IDs from the 'used shipping method' query
This commit simplifies the logic of the 'used shipping method' segment
by removing the shipping method IDs from the queries. After some
considering, we have come to the conclusion that using just the shipping
method instance ID is enough.

[MAILPOET-4992]
2023-07-04 22:23:06 +02:00
f20878f7f3 Update the queries of the 'used shipping method' filter
This commit changes the logic of the code that builds the queries for
the 'used shipping method' filter. The initial implementation relied
only on the shipping method name that is stored in
wp_woocommerce_order_items.  This implementation did not work as the
name is not unique. The new implementation use the shipping method id
and the instance id that are stored in wp_woocommerce_order_itemmeta and
the combination of both fields is unique.

[MAILPOET-4992]
2023-07-04 22:23:06 +02:00
993e292fd0 Fix typo
[MAILPOET-4992]
2023-07-04 22:23:06 +02:00
5447e253e5 Add backend logic to handle new "used shipping method" segment
[MAILPOET-4992]
2023-07-04 22:23:06 +02:00
2a012f5fc8 Add braces to if statements
MAILPOET-4990
2023-06-28 15:14:03 +02:00
2db454bc49 Fix exception codes
MAILPOET-4990
2023-06-28 15:14:03 +02:00
61bb3a65d7 Add backend logic for customer text field filters
MAILPOET-4990
2023-06-28 15:14:03 +02:00
b018918bc4 Extract (soon to be) shared text field operators
MAILPOET-4990
2023-06-28 15:14:03 +02:00
de3d3a5fe2 Fix: subscriber segmentation can now target contacts who did not open any emails
There was a bug in the query that is used to get the subscribers that
opened emails that was preventing it from working when trying to get
subscribers that opened zero emails.

The problem was that we were adding the user_agent_type	as a condition
on the WHERE part of the clause. Meaning that it was being used to
filter the overall results and thus excluding all subscribers that had
no entries in the wp_mailpoet_statistics_opens table. By moving this
condition to the ON clause in the LEFT JOIN, we use the user_agent_type
field to match rows between tables. The value of this field will still
be taken into consideration when counting the number of opens as we are
counting the number of entries in the wp_mailpoet_statistics_opens
table.

[MAILPOET-5347]
2023-06-05 13:46:43 +02:00
43ee076562 Change the behavior of the country segment
This commit changes the behavior of the country segment to include
subscribers that never placed an order (or placed orders that failed or
were canceled) as long as they have a country set in the WooCommerce
customer lookup table.

[MAILPOET-4188]
2023-06-05 12:26:03 +02:00
ec68818c1a Add filter for used payment method
MAILPOET-4993
2023-05-19 11:57:13 +02:00
e636537580 Add ability to duplicate dynamic segments
MAILPOET-4635
2023-05-15 13:48:41 +02:00
974cd32950 Dynamic segment filter for first/last name and email
MAILPOET-4997
2023-05-12 13:59:12 +02:00