• Hi,

    How can I setup WP Sendfox so that I can choose what list to add the user to based on the language of the page the user is coming from?

    I’m using Polylang for multiple languages of my site and would like to add users to a list that is dedicated for the language they came from (if you came from an English page you are signed up to the English list, if you came from a French page you are added to the French list).

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author BogdanFix

    (@bogdanfix)

    Hi @guymal! I have 2 questions to you:

    1. How are people signing up on your website? Through which of the integrations?
    2. How the language is switched on your website? Is the locale displayed as a subdomain or a suburl, like yourdomain.com/fr/ ?
    Thread Starter guymal

    (@guymal)

    Hi @bogdanfix

    1. People are signing up through sales with Woocommerce. So they are added to my Sendfox list with your Woo integration once they make a purchase.
    2. The language is set through the url in my example, so mysite.com/fr/somepage but with Polylang you can get the page language simply by using:
    $language=pll_get_post_language( $page_id);

    Since different sites could be using different methods to determine the current language (subdomain, suburl, entirely different domain etc…)

    Thanks

    Plugin Author BogdanFix

    (@bogdanfix)

    Thanks for the detailed response, @guymal. It will require some customization from my end to add functionality that allows to setup different lists for different locales.

    Unfortunately, I am currently not able to take any custom projects.

    So, if you could find a way to build that customization, you can easily make a pull request via GitHub: https://github.com/bogdanfix/wp-sendfox

    And I will be happy to check and merge that code.

    Thread Starter guymal

    (@guymal)

    Thanks for the reply @bogdanfix

    What I did was create a code snippet that uses

    add_filter( 'sf4wp_before_add_contact', 'sendfox_list_by_language', 10, 3 );

    and then in that check the woocommerce order to see what product they ordered, check what language the product is in, and then accordingly pick what Sendfox list to use.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Adding to different lists for different languages’ is closed to new replies.