Can users toggle email marketing status in their accounts?

Hi There

We’re looking to update our stores to allow users to toggle their email marketing status with the store via their user accounts.

Is this possible?

I’ve tried adding the following to account.liquid, but am not getting any output;

{%- if customer.accepts_marketing -%}
  

{{ customer.email }} accepts marketing

 
  

Unsubscribe link tbc

 
{%- else -%}

{%- endif -%}

Hi @SeanieB1983 ,

The condition you added is correct. Returns true if the customer accepts marketing, returns false if the customer does not. https://i.imgur.com/TE79EL6.png

If it shows nothing, then the customer does not accept marketing. You can check this at Admin Customer: https://i.imgur.com/F8qVC1c.png

Hope it is clear to you.