Commit Graph

125 Commits

Author SHA1 Message Date
Jan Lysý
09c2ce653c Fix code style by updated ruleset
[MAILPOET-3912]
2022-01-13 09:23:55 +01:00
Rodrigo Primo
8ac0c9c70f Add two new comparison options to the subscribed date segment
This commit adds two new comparison options ("on" and "not on")
to the "subscribed date" segment.

[MAILPOET-3614]
2022-01-13 09:22:42 +01:00
Rodrigo Primo
d7e615f022 Add more comparison options for two segments
This commit adds two new comparison options ("equals" and "not equals")
to the segments "# of opens" and "# of machine-opens".

[MAILPOET-3614]
2022-01-13 09:22:42 +01:00
Pavel Dohnal
91c34e43b3 Fix clicked segments
[MAILPOET-4045]
2022-01-11 12:47:25 +01:00
Jan Lysý
fb583b6162 Use WooCommerce tables instead of postmeta
[MAILPOET-3576]
2022-01-10 09:49:07 +01:00
wxa
5641efb0d7 Move multi-conditional segment processing to Premium
[MAILPOET-3929]
2021-12-23 09:53:03 +01:00
wxa
5e486462c0 Require Premium plugin for multi-condition segments
[MAILPOET-3929]
2021-12-23 09:53:03 +01:00
Rostislav Wolny
e971958297 Add migration for updating Woo Subscription segment data
[MAILPOET-3956]
2021-12-23 08:50:27 +01:00
Rostislav Wolny
8f78ad9939 Add all of and none of operators for Woo Subscription segment
[MAILPOET-3956]
2021-12-23 08:50:27 +01:00
Rostislav Wolny
651528c0b6 Add support for multiple any of for Woo subscriptions segment
[MAILPOET-3956]
2021-12-23 08:50:27 +01:00
wxa
e53d746432 Add more comparisons for WooCommerce dynamic segments
[MAILPOET-4007]
2021-12-23 08:48:36 +01:00
Rostislav Wolny
6b92810281 Fix multiple purchased product conditions with all of
Non unique count parameter name was causing that when more conditions
used all of operand the count parameter was overrode in the final combined query.
[MAILPOET-4010]
2021-12-23 08:45:54 +01:00
John Oleksowicz
df119d18a0 Refactor duplicate segment name checks
This creates a single method we can rely on to check for the uniqueness
of a segment name and refactors places where we had duplicate code to
use the new method.

[MAILPOET-3998]
2021-12-22 09:36:56 +01:00
Pavel Dohnal
21fcc69b36 Use a better comparasion
[MAILPOET-4008]
2021-12-20 12:40:25 +01:00
Pavel Dohnal
65ef9b6572 More comparison options for custom field segment
[MAILPOET-4008]
2021-12-20 12:40:25 +01:00
Pavel Dohnal
e114bfcafb Fix none of query
[MAILPOET-3950]
2021-12-20 09:48:56 +01:00
Pavel Dohnal
9c0b27644a Map newsletters array
[MAILPOET-3950]
2021-12-20 09:48:56 +01:00
Pavel Dohnal
c13727a02b Process multiple newsletters with operator NONE
[MAILPOET-3950]
2021-12-20 09:48:56 +01:00
Pavel Dohnal
57560bddaf Process multiple newsletters with operator ALL
[MAILPOET-3950]
2021-12-20 09:48:56 +01:00
Pavel Dohnal
b47842c461 Process multiple newsletters with operator ANY
[MAILPOET-3950]
2021-12-20 09:48:56 +01:00
Pavel Dohnal
0b4614be1e Move clicked any link to a new class
[MAILPOET-3950]
2021-12-20 09:48:56 +01:00
Brezo Cordero
9a9ab257c2 Map operator for "is in country" dynamic filter
[MAILPOET-3952]
2021-12-20 09:29:41 +01:00
Brezo Cordero
67036f5d74 Add Any and None conditions to "is in country" segment
[MAILPOET-3952]
2021-12-20 09:29:41 +01:00
Brezo Cordero
06a4be4214 Use WC lookup tables for improved performance
This commit is part of a task to allow multiple values in "is in country" segment. This commit replaces the queries with the more performant ones written by @lysyjan. It also creates the lookup tables on the integration database and updates the test.

[MAILPOET-3952]
2021-12-20 09:29:41 +01:00
Brezo Cordero
b04cb41921 Make country always array
This commit is part of a task to allow multiple values in "is in country" segment. This commit first changes the string value $country to Array, adding a check for backwards compatibility and an integration test.

[MAILPOET-3952]
2021-12-20 09:29:41 +01:00
Oluwaseun Olorunsola
02fc0df655 Fixed count missing parameter suffix
[MAILPOET-3953]
2021-12-20 09:26:13 +01:00
Oluwaseun Olorunsola
ea23ee63ae Allow multiple values in purchased in this category segment
[MAILPOET-3953]
2021-12-20 09:26:13 +01:00
Pavel Dohnal
c1f4e0bf32 Make sure the user roles is always array
[MAILPOET-3955]
2021-12-16 14:46:16 +01:00
Pavel Dohnal
78e1ea5954 Map operator in WP role
[MAILPOET-3955]
2021-12-16 14:46:16 +01:00
Pavel Dohnal
c5d994dbf0 Make the segment work with ALL condition
[MAILPOET-3955]
2021-12-16 14:46:16 +01:00
Pavel Dohnal
d541edc865 Make the segment work with NONE condition
[MAILPOET-3955]
2021-12-16 14:46:16 +01:00
Pavel Dohnal
6d5d5ccfda Make the segment work with ANY condition
[MAILPOET-3955]
2021-12-16 14:46:16 +01:00
Pavel Dohnal
c2e841fd3d Make role always array
[MAILPOET-3955]
2021-12-16 14:46:16 +01:00
Rodrigo Primo
1c195789ba Fix "# number of machine opens" segment
There was a bug that was making the code use the wrong filter
and thus the wrong SQL query for the "# number of machine opens"
segment. Resulting in the wrong subscribers being associated with this
segment.

The email() method of the FilterFactory was using the wrong check to
decide which filter to use for this segment (the filter should be
EmailOpensAbsoluteCountAction and the factory was using EmailAction).
This commit fixes this problem.

[MAILPOET-4011]
2021-12-13 13:54:17 +01:00
Jan Lysý
d3ee546518 Add support for more product ids in filter
[MAILPOET-3954]
2021-12-01 09:13:20 +01:00
Pavel Dohnal
e2aef203d2 Make sure segment id is always number
[MAILPOET-3502]
2021-11-30 12:33:38 +01:00
Pavel Dohnal
f759057fa8 Add filter
[MAILPOET-3502]
2021-11-30 12:33:38 +01:00
Pavel Dohnal
ec390b2131 Add list segment to data mapper
[MAILPOET-3502]
2021-11-30 12:33:38 +01:00
Pavel Dohnal
5fc8d51720 Add a filter for lists dynamic segment
[MAILPOET-3502]
2021-11-30 12:33:38 +01:00
wxa
aa4ecb2645 Add subscriber score segment back-end
[MAILPOET-3607]
2021-11-29 13:02:49 +01:00
Rodrigo Primo
120aa74511 Fix query to get subscribers of the "has WC subscription" segment
There was an issue in the old query used to get subscribers of the "has WooCommerce subscription" segment. When getting the IDs of the users
that purchased a given subscription, it would get all the entries from wp_woocommerce_order_items without checking the value of ordem_item_type.

The problem is that wp_woocommerce_order_items contains entries for the purchased product, but also other things like shipping and tax information. The WooCommerce Subscriptions extension uses wp_woocommerce_order_items to store data when a user switches from one subscription to another. This was causing users to be included in the "has WooCommerce subscription" segment even after they had switched from the subscription that belonged to the segment to another one.

This problem was fixed by adding another condition to the part of the query that joins with wp_woocommerce_order_items to get only entries that have the value 'line_item' for the field 'order_item_type'. This excludes entries where the value of 'order_item_type' is 'line_item_switched', which is what WC Subscriptions uses to track subscriptions that a user used to have before switching to something else.

[MAILPOET-3898]
2021-11-22 12:53:39 +01:00
Jan Lysý
6e6ba3e7a1 Use new signature of the dynamicSegmentFilterData constructor
[MAILPOET-3427]
2021-10-27 15:45:17 +02:00
Jan Lysý
cc05b945b4 Use new properties in repository
[MAILPOET-3427]
2021-10-27 15:45:17 +02:00
Jan Lysý
02ad7c9c8e Add repository for DynamicSegmentFilters
[MAILPOET-3427]
2021-10-27 15:45:17 +02:00
Pavel Dohnal
21839fc30b Fix indentation of multiline function declarations
[MAILPOET-3732]
2021-09-17 12:17:36 +02:00
Pavel Dohnal
cdda3480ca Make all constructor signatures multiline
[MAILPOET-3732]
2021-09-16 14:19:40 +02:00
Pavel Dohnal
b0b6f1ff35 Remove unnecessary check
[MAILPOET-3737]
2021-09-08 14:38:41 +02:00
Pavel Dohnal
d1b2458227 Add # of machine opens segment
[MAILPOET-3737]
2021-09-08 14:38:41 +02:00
Pavel Dohnal
2ab5f04f46 Add segment for machine opens
[MAILPOET-3737]
2021-09-08 14:38:41 +02:00
Pavel Dohnal
cdd3ff5178 Use only non-machine opens for segment # open
[MAILPOET-3737]
2021-09-08 14:38:41 +02:00