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]
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]
I found this method in the context of a ticket to refactor Paris code to
Doctrine. As far as I can tell, it is not used anymore and it is
safe to delete it.
It was added in 1af5802 and was used only inside
Models\Subscriber::subscribe(). Then subscribe() was moved to
Subscriber\SubscriberActions in 7528f0f. Finally, commit 7db2384
refactored SubscriberActions removing the only two calls to
Source::setSource().
The test class SourceTest is removed as well as its only purpose was to
test Source::setSource().
[MAILPOET-5345]
This commit fix a layout error in the optin checkbox that MailPoet adds
to the WooCommerce checkout when the site is using the themes Twenty
Twenty-Two and Twenty Twenty-Three.
This problem was happening because WooCommerce add CSS to make its own
checkboxes work with those two themes, but it broke checkboxes the
layout of checkboxes created with woocommerce_form_field().
The Woo checkboxes in the checkout display the text inside an <span>
element and that doesn't happen for checkboxes created with
woocommerce_form_field(). The problem is in those CSS rules:
0ea5205672/plugins/woocommerce/client/legacy/css/twenty-twenty-three.scss (L731-L757)
[MAILPOET-4133]
Before we wanted to makr subscribers as unsubscribed when creating a
subscriber linked to a new WP users if the optin checkbox was not
checked. We are changing this behavior and no action should be taken
when creating a new subscriber with the optin checkbox unchecked. So
this commit removes code that is not necessary anymore from
\MailPoet\Segments\WP::createOrUpdateSubscriber().
[MAILPOET-4178]
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]
This commit changes the behavior of the optin checkbox that MailPoet
adds to the WooCommerce checkout.
Now the checkbox is not checked by default for logged in users who
already subscribed to a list. Also, users won't be unsubscribed anymore
and have their global status change to unsubscribed if they uncheck the
checkbox.
The only action that is performed after this change is to subscribe
users if they check the checkbox.
This change was implemented both for the normal checkout and the block
checkout.
It was also necessary to remove the AutomateWoo integration that
depended on subscribers being unsubscribed during checkout.
[MAILPOET-4178]