This commit simplifies the logic of the 'used shipping method' segment
by removing the shipping method IDs from the queries. After some
considering, we have come to the conclusion that using just the shipping
method instance ID is enough.
[MAILPOET-4992]
This commit fixes an issue with the initial logic used to retrieve
shipping methods to build the UI of the 'used shipping method' segment.
It updates the code to properly retrieve WooCommerce shipping methods
configured for all zones. Before the code was getting just the shipping
method types and the shipping method instances.
The query that is used to get the subscribers that match this segment
will be updated in another commit.
[MAILPOET-4992]
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]
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]
The property was added so that we were able to set the main page
dynamically based on the feature switch value. This is no longer needed and
we can use the hardcoded constant as we did before.
[MAILPOET-4831]
MailPoet adds a link to the WooCommerce task list pointing to its own
welcome wizard. We want to track users that arrive to the MP wizard from
WooCommerce but at this point tracking is not enabled. So we store the
information in a setting, and send the tracking event to Mixpanel, if it
is enabled, after the user completes the wizard.
[MAILPOET-4814]
Those newsletters that allow updating their body html should
persist the couponId along side the Coupon block settings so
that on the next rendering attempt the same coupon code is
used
[MAILPOET-4763]
We need to use the decimal separators selected by the user for our validation. We are also using the validation used on the adding/editing coupon page
MAILPOET-4762