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]
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]
When no confirmation mail gets send, the user is subscribed immediately. In this case
we need to fire the mailpoet_segment_subscribed action, so the trigger can listen to this
event.
[MAILPOET-4773]
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]
This commit changes SegmentsRepository::getWPUsersSegment() so that it
behaves like Models\Segment::getWPSegment() and creates a WP segment
when none is found. This is needed to replace the latter with the former
in a subsequent commit.
[MAILPOET-4306]
Remove the following errors:
(Method|Property|Function) has no (return )?type specified.
(Method|Function) has parameter with no type (specified).
I have modified bulkDelete to be similar to bulkDelete on SubscribersRepository.php. This function is used in MailPoet\Test\API\JSON\v1\Segments.
[MAILPOET-3720]
Remove the following errors:
(Method|Property|Function) has no (return )?type specified.
(Method|Function) has parameter with no type (specified).
[MAILPOET-3720]
Remove the following errors:
(Method|Property|Function) has no (return )?type specified.
(Method|Function) has parameter with no type (specified).
[MAILPOET-3720]
Remove the following errors:
(Method|Property|Function) has no (return )?type specified.
(Method|Function) has parameter with no type (specified).
[MAILPOET-3720]
Remove the following errors:
(Method|Property|Function) has no (return )?type specified.
(Method|Function) has parameter with no type (specified).
array_walk on import.php was expecting the key as the second parameter to the function. I have switched it to array_map.
[MAILPOET-3720]
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]