Home Forums Newsletter Plugin Support Forum Adding subscribers to list by language

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #122323
    danielle_newsletter
    Participant

    Hi,

    I’m using WPML and newsletter plugin and followed the steps in this article

    https://wpml.org/documentation/plugins-compatibility/beginners-guide-to-using-the-newsletter-plugin-on-multilingual-websites/#create-translate-subscriber-list

    to add a subscriber to a certain list by language.

    But this doesn’t seem to work? Is this a bug or am I doing something wrong?

    Kind regards,
    Danielle

    #122335
    Stefano
    Keymaster

    Hi, it should work. How did you check it? Have you started a subscription from the language X view of the fronted and the subscriber has not be added to the selected list?

    Stefano.

    #122339
    danielle_newsletter
    Participant

    Hi Stefano,

    I’m using the Woocommerce addon. In our Webshop we have 4 languages. When the subscriber is in language NL he/she should be added to list A, for all other languages the subscriber should be added to language B.

    I managed to set the settings as described in the article, but the subscriber does not get added to any list.

    Kind regards,
    Danielle

    #122352
    danielle_newsletter
    Participant

    I tested by placing an order and then then subcribed to the newsletter. I do receive the confirmation e-mail, just not added to the list.

    Danielle

    #122552
    danielle_newsletter
    Participant

    The reason I think it might be a bug in the newsletter plugin is because I also had issues with the right e-mail content being sent. After user subscribed he’d always get the default e-mail content belonging to all languages and not the e-mail content I had set per language.

    After debugging this issue I found out that in includes/module.php there is a function get_user_language that wasn’t working correctly.

    if ($user && $this->is_multilanguage()) {
    return $user->language;
    }

    After logging $user->language it turned out to be empty.

    I had to change $user->language into a line of code from wpml to get the current language and that worked for me. The e-mails are now sent out in the correct language.

    But the issue with the lists I haven’t been able to resolve. Would be nice if you could take a look at it Stefano.

    Gr. Danielle

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