• Resolved cutu234

    (@cutu234)


    Hi,

    I use a custom function to create newsletter subscribers directly in the database. Is the token necessary, or can I leave it empty? If necessary, does it have to be unique, or could I use a random string of 10 characters/numbers?

    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Michael Travan

    (@michael-travan)

    Hello @cutu234,

    may I ask you where these subscribers come from? How do this function work exactly?

    Michael

    Thread Starter cutu234

    (@cutu234)

    That’s pretty easy: We want customers who purchased in the shop to be automatically subscribed to the newsletter. This is by all means legal (in terms of GDPR). I know that you offer a premium addon for this. But this is such a tiny and simple function that we decided to use the standard “woocommerce_thankyou” action for it. Everything seems to work just fine without a token, but it’s there for a reason, I guess. ??

    Thank you.

    Plugin Support Michael Travan

    (@michael-travan)

    Hello @cutu234,

    thanks for the clarification. Please note that a token is strictly necessary.

    Michael

    Thread Starter cutu234

    (@cutu234)

    Thank you. I’ve just run some tests. As far as I can see, these tokens are generated automatically after a newsletter was sent, if no token could be found in the database. This pretty much answers my question, doesn’t it? They are necessary, yes. But they will be created anyway. So, no need to create a token. However, it seems to work perfectly fine with a random string, too. Did I miss anything?

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.