Unchecking the Email Marketing at checkout doesn't Unsubscribe the customer

ranjit-anesh
New Member
2 0 1

Hello,

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?

Will Shopify fix this later?

0 Likes
Rocio89
New Member
1 0 0

Hi,

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.

Is there any way to fix this?

Thanks!

0 Likes
ranjit-anesh
New Member
2 0 1

Hi @Rocio89 ,

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.

Hope it helps.

Thanks.