Support » Plugin: Cookii - Free GDPR Cookie Consent » WPML solution

  • Resolved zetoun17

    (@zetoun17)


    Hello
    if you use WPML and want to display the correct message add this code in functions.php

    global $WPCookies;
    if(!is_admin() && $WPCookies && defined(ICL_LANGUAGE_CODE))
    {
      add_filter('option_'.$WPCookies->option_name,'site_wpml_cookie_msg',10,2);
      function site_wpml_cookie_msg($val,$option)
      {
        $val['message']=$val['message_lang_'.ICL_LANGUAGE_CODE];
        return $val;
      }
    }
  • The topic ‘WPML solution’ is closed to new replies.