Commit Graph

16 Commits

Author SHA1 Message Date
80655813b7 Stop subscribing customers to the Woo list when they are created
This commit changes the behavior of
\MailPoet\Segments\WooCommerce::synchronizeRegisteredCustomer(). This
method is called when a new WooCommerce customer is created. Before, it
would always add the customer to the Woo segment expecting
\MailPoet\WooCommerce\Subscription::subscribeOnCheckout() to unsubscribe
the customer if the optin checkbox was not checked.

Since the behavior of the latter method changed in a previous commit and
it doesn't unsubscribe customers anymoreif the option checkbox is not
checked, the former method had to be updated to only subscribe the customer
if not in checkout context or if in checkout context and optin checkbox is
enabled and checked.

[MAILPOET-4178]
2023-05-30 13:25:24 +02:00
de18016d7d Replace calls to ModelValidator::validateEmail()
We want to remove/refactor the whole ModelValidator class as part of the
Doctrine refactor.

This commit replaces all the calls to ModelValidator::validateEmail()
with calls to Validator::validatesEmail().

[MAILPOET-4343]
2023-05-17 12:37:22 +02:00
78446d174a Fix quotes in a queries processed by $wpdb
These queries failed when ANSI_QUOTES mode is enabled
[MAILPOET-4887]
2022-12-12 13:59:09 +01:00
43922a7c27 Notify about subscriber changes in WP and Woo synchronizations
[MAILPOET-4727]
2022-10-27 09:31:40 +02:00
1010b64c05 Update updateNames() to work with Woo Custom Order Tables
[MAILPOET-4711]
2022-10-19 11:32:41 +02:00
50b18834d2 Adapt query to get registered customers to work with custom orders tables
[MAILPOET-4569]
2022-10-10 09:21:38 +02:00
e3cf1a047b Adapt query to get guest customers to work with custom orders tables
[MAILPOET-4569]
2022-10-10 09:21:38 +02:00
05fb310130 Use different query to get emails and orderds IDs if WooCoomerce COT is enabled
[MAILPOET-4577]
2022-10-05 10:47:06 +02:00
b6bdce3535 Change insertSubscriberFromOrder() to use WooCommerce methods
This commit changes
\MailPoet\Segments\WooCommerce::insertSubscriberFromOrder() to use
WooCommerce method instead of querying the database directly. This is
needed as WooCommerce is moving away from WP tables and creating its own
tables.

[MAILPOET-4570]
2022-10-03 09:30:42 +02:00
24cca1ba04 Cache total subscribers count, add tests
[MAILPOET-4416]
2022-08-24 12:18:44 +02:00
6d5eed6190 Remove PHPStan level 6 errors from Segments\WooCommerce
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:12 +02:00
69a82a0213 Fix issue with collation conflict failing the tests
If the default collation of database would vary from the one
from created tables it would cause the temp table created to
have a different collation than the main tables

[MAILPOET-4251]
2022-05-17 14:17:26 +02:00
bc936ef13e Quote emails when inserting/updating WooCommerce subscribers
[MAILPOET-4248]
2022-04-14 09:41:55 +02:00
cfc7c623e3 Separate insert from update on duplicate
[MAILPOET-4248]
2022-04-14 09:41:55 +02:00
bb79322589 Check subscriber status before subscribe to WC list
Because synchronization of a registered customer can be
in blocks checkout called multiple times, we cannot override current relation.
[MAILPOET-3937]
2022-02-10 12:35:14 +01:00
9f790efbf0 Move plugin files to a subfolder
[MAILPOET-3988]
2022-01-18 15:30:22 +01:00