I received an email saying that they are still getting newsletters even when they unchecked the Email Marketing checkbox during checkout.
So I tested it myself and found that when you continue with checkout with Email Marketing checkbox checked during checkout at first and then later just before placing order you go back to the Information step and uncheck Email Marketing checkbox and then continue again with the checkout and place the order the Email Marketing for that customer not unsubscribed.
Also placing another order with Email Marketing checkbox unchecked does not unsubscribe the subscribed customer.
Is it something that Shopify missed? Or is there a reason they made it this way?
I have found the same issue. Even if the customer unchecks the email marketing at checkout, I still see that customer with the âSubscribedâ tag for Email Subscription Status.
It seems that Shopify deliberately doesnât unsubscribe customers like that for a good reason. So I had to customize it myself.
Hereâs what I did and you can do:
Add a hidden input field for subscription status as a checkout attribute with JS.
On check/uncheck of the checkbox set the value of the hidden input field accordingly.
Create a webhook for order creation.
In the webhook check the value of that checkout/order attribute for subscription status an unsubscribe the customer accordingly.
Iâm using Shopify plus so it was a bit easier for me writing my codes in checkout.liquid in the theme itself. But youâre not using Shopify plus you can try to use Additional scripts under Settings > Checkout in the admin.
@ranjit-anesh - We have come across the same issue and will explore your solution. Thank you for posting.
Regarding âShopify deliberately doesnât unsubscribe customers like that for a good reasonâ Would you mind expanding on what is their good reason is? Our Shopify success manager has just said our 2 Million other customers have not complained so it cannot be wrong⌠Very unhelpful.