Commit Graph

53 Commits

Author SHA1 Message Date
John Oleksowicz
ec68818c1a Add filter for used payment method
MAILPOET-4993
2023-05-19 11:57:13 +02:00
John Oleksowicz
e636537580 Add ability to duplicate dynamic segments
MAILPOET-4635
2023-05-15 13:48:41 +02:00
John Oleksowicz
974cd32950 Dynamic segment filter for first/last name and email
MAILPOET-4997
2023-05-12 13:59:12 +02:00
John Oleksowicz
9e5b5d5ebe Add backend error checking for average spent filter
MAILPOET-4987
2023-05-11 11:47:01 +02:00
John Oleksowicz
d8e29e9edb Prefix average spent fields
MAILPOET-4987
2023-05-11 11:47:01 +02:00
John Oleksowicz
ca2a6ceac8 Add missing options and fix order of options
MAILPOET-4987
2023-05-11 11:47:01 +02:00
John Oleksowicz
46316b48e2 Clean up code left over after refactoring
MAILPOET-4987
2023-05-11 11:47:01 +02:00
John Oleksowicz
a2853236fc Add average order value filter
MAILPOET-4987
2023-05-11 11:47:01 +02:00
John Oleksowicz
f75173dcd5 Add "subscribed via form" dynamic filter
MAILPOET-5005
2023-05-09 13:10:08 +02:00
John Oleksowicz
8a66c83257 Add "was sent email" filter
MAILPOET-5004
2023-05-01 11:28:25 +02:00
Rodrigo Primo
119dcbd5b5 Sanitize name and description when creating a segment
This commits adds the sanitization right before the data is added to the
database (\MailPoet\Segments\SegmentsRepository::createOrUpdate()) and
removes the sanitization from
\MailPoet\Segments\DynamicSegments\SegmentSaveController::save() to
avoid sanitizing twice. save() calls createOrUpdate().

Before this commit, we were sanitizing the name and description of
dynamic segments but not regular segments.

[MAILPOET-5232]
2023-04-17 14:33:51 -03:00
John Oleksowicz
8700178f01 Remove debug code
MAILPOET-5083
2023-04-13 17:56:13 +02:00
John Oleksowicz
40fc3882f3 Use correct statuses for category filter
MAILPOET-5083
2023-04-13 17:56:13 +02:00
John Oleksowicz
483acb0040 Use correct statuses for single order value
MAILPOET-5083
2023-04-13 17:56:13 +02:00
John Oleksowicz
30c8ce0839 Use correct statuses for total spent
MAILPOET-5083
2023-04-13 17:56:13 +02:00
John Oleksowicz
2caa535098 Use correct statuses for product filter
MAILPOET-5083
2023-04-13 17:56:13 +02:00
John Oleksowicz
aa7bd6eb67 Use correct statuses for number of orders filter
MAILPOET-5083
2023-04-13 17:56:13 +02:00
John Oleksowicz
03da98e5df Avoid simple text replacements in SQL if possible
MAILPOET-4986
2023-04-03 10:20:02 +02:00
John Oleksowicz
1cab4a944a Use standard joins where possible
MAILPOET-4986
2023-04-03 10:20:02 +02:00
John Oleksowicz
509a79fd1a Proper method naming
MAILPOET-4986
2023-04-03 10:20:02 +02:00
John Oleksowicz
68902a206d Extract more to helpers
MAILPOET-4986
2023-04-03 10:20:02 +02:00
John Oleksowicz
26ec430942 Refactor to use DI instead of inheritance
MAILPOET-4986
2023-04-03 10:20:02 +02:00
John Oleksowicz
fa43495d81 Minor refactoring
MAILPOET-4986
2023-04-03 10:20:02 +02:00
John Oleksowicz
c747b71829 Simplify subquery
MAILPOET-4986
2023-04-03 10:20:02 +02:00
John Oleksowicz
d505bffcfd Refactor to use shared date functionality
MAILPOET-4986
2023-04-03 10:20:02 +02:00
John Oleksowicz
caba21b8af Fix relative date calculation
MAILPOET-4986
2023-04-03 10:20:02 +02:00
John Oleksowicz
d52113d104 Extract shared date filter functionality
MAILPOET-4986
2023-04-03 10:20:02 +02:00
John Oleksowicz
37226202bc Implement purchase date dynamic filter
MAILPOET-4986
2023-04-03 10:20:02 +02:00
Rodrigo Primo
b963d8b988 Add a new WooCommerce segment based on the value of the orders
[MAILPOET-4988]
2023-03-28 15:51:01 +02:00
Rostislav Wolny
58b2ac4a60 Add collation check to WooSubscriptions filter
We join using a string column and it may cause errors when the columns
using different collation. This commit adds collation check so that we can alter
collation in the join condition in case it is needed.
[MAILPOET-4568]
2023-03-27 12:26:35 +02:00
Rostislav Wolny
bb9b04ecc8 Update WooSubscription filter to work with HPOS data
The wc_orders table doesn't contain user_id but has billing_email and customer_id.
These were two options I could use for joining subscribers table.
I could use the customer_id but I would have to join wc_customer_lookup table and then
the orders table. Instead of customer_id I chose the billing_email. Both tables have
indexes on the email columns and it is one join instead of two.
[MAILPOET-4568]
2023-03-27 12:26:35 +02:00
Sam Najian
2bbaa246d7 Sanitize name and description of segment when saving
[MAILPOET-4942]
2023-01-16 13:59:30 +01:00
Jan Jakes
926620e8f8 Ignore strict types rule in all existing files that don't have it
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
Jan Lysý
1eef663ca3 Add new dynamic filter for tags
[PREMIUM-196]
2022-07-25 09:32:02 +02:00
Sam Najian
609d80ca05 Fix issue of getting none-customer subs for # order filter
[MAILPOET-4390]
2022-06-06 12:06:07 +02:00
Brezo Cordero
75eb7f6900 Move some types from comments to signature
[MAILPOET-3720]
2022-05-23 12:04:36 +02:00
Brezo Cordero
ec47cf429a Remove PHPStan level 6 errors from DynamicSegments
Remove the following errors:
(Method|Property|Function) has no (return )?type specified.
(Method|Function) has parameter with no type (specified).

[MAILPOET-3720]
2022-05-23 12:04:36 +02:00
Brezo Cordero
1885825e24 Remove PHPStan level 6 errors from DynamicSegments Filters
Remove the following errors:
(Method|Property|Function) has no (return )?type specified.
(Method|Function) has parameter with no type (specified).

[MAILPOET-3720]
2022-05-23 12:04:36 +02:00
Jan Lysý
6ee1955f53 Improve not_equals condition for custom fields
[MAILPOET-4157]
2022-04-18 14:11:52 +02:00
David Remer
a8f80e61d1 Exclude wc-on-hold and wc-pending orders from calculating segment
[MAILPOET-4127]
2022-03-24 16:00:16 +01:00
David Remer
7f13774ce6 Exclude wc-on-hold and wc-pending orders from calculating segment
[MAILPOET-4127]
2022-03-24 16:00:16 +01:00
David Remer
3316a2a3f8 Include wc-pending-cancel status when filtering subscriptions
[MAILPOET-4109]
2022-03-07 16:05:11 +01:00
wxa
5772dc086c Add Woo membership segment backend
[MAILPOET-3880]
2022-01-27 16:14:14 +01:00
Rostislav Wolny
5643bc6ac7 Deprecate email action filter actions that are no longer used
[MAILPOET-3951]
2022-01-19 16:18:08 +01:00
Rostislav Wolny
75ab2338d6 Remove backward compatibility code for email action filters
This commit cleans up code that is no longer needed after email actions filter data migration.
[MAILPOET-3951]
2022-01-19 16:18:08 +01:00
Rostislav Wolny
e5fa13231e Update clicked links filter logic that no selected links mean all links
As we always supported the filter even without specified links we needed
to update the logic only for newly added all of operator.
[MAILPOET-3951]
2022-01-19 16:18:08 +01:00
Rostislav Wolny
ae24da9ea2 Replace not clicked segment filter with clicked variant in UI
[MAILPOET-3951]
2022-01-19 16:18:08 +01:00
Rostislav Wolny
7b47523d27 Add support for all of and none of to clicked links segment filter
[MAILPOER-3951]
2022-01-19 16:18:08 +01:00
Rostislav Wolny
ea8bfdc863 Add multiple emails support with any of and all of for machine-opened
[MAILPOET-3957]
2022-01-19 16:18:08 +01:00
Rostislav Wolny
743276c057 Split EmailActions filter code into 2 methods
With the recent changes the code for building SQL query for email actions based filters became more complex.
This commit splits the code so that it is more readable.
[MAILPOET-3951]
2022-01-19 16:18:08 +01:00