Title: Make plugin WPML aware
Last modified: May 28, 2019

---

# Make plugin WPML aware

 *  Resolved [anou](https://wordpress.org/support/users/anou/)
 * (@anou)
 * [7 years ago](https://wordpress.org/support/topic/make-plugin-wpml-aware/)
 * Hello,
 * I have made a patch to make Exit-popup WPML aware. If you want to merge it so
   I do not have to apply it each time you update your module, this would be so 
   nice 😉
 * [https://github.com/anou/exit-popup/blob/master/exit-popup-wpml-aware.patch](https://github.com/anou/exit-popup/blob/master/exit-popup-wpml-aware.patch)
 * If not, that not a problem.
 * Thank you for your plugin

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [nimonogi](https://wordpress.org/support/users/nimonogi/)
 * (@nimonogi)
 * [7 years ago](https://wordpress.org/support/topic/make-plugin-wpml-aware/#post-11582814)
 * I have already implemented your code. Please check latest version and let me 
   know.
 *  Thread Starter [anou](https://wordpress.org/support/users/anou/)
 * (@anou)
 * [7 years ago](https://wordpress.org/support/topic/make-plugin-wpml-aware/#post-11582857)
 * Thank you very much!
 * Just one mistake: you forgot to use `$check_lg` in the `if()` line 183:
    `if(
   $check_lg && !isset($_COOKIE['viewedExitPopupWP']) &&...`
 *  [nimonogi](https://wordpress.org/support/users/nimonogi/)
 * (@nimonogi)
 * [7 years ago](https://wordpress.org/support/topic/make-plugin-wpml-aware/#post-11582889)
 * How is this check required? Can you please provide more details
 *  Thread Starter [anou](https://wordpress.org/support/users/anou/)
 * (@anou)
 * [7 years ago](https://wordpress.org/support/topic/make-plugin-wpml-aware/#post-11582912)
    1. line 172: the `$check_lg` is `true` by default, so it won’t bother any installation
       that do not have WPML installed
    2. then line 173, I check if WPML exist, and if so, `$check_lg` becomes `false`
       so this way if you haven’t check any language(s) in the Exit Popup Settings 
       page, the popup won’t display anywhere.
    3. if you check one or more language(s), the Exit Popup will show up on the given
       selected language(s)
 * Finally if you do not do this check, it is like the code added is useless 🙂
 * Hope I have been enough clear in my explanation 🙂
 *  Thread Starter [anou](https://wordpress.org/support/users/anou/)
 * (@anou)
 * [7 years ago](https://wordpress.org/support/topic/make-plugin-wpml-aware/#post-11582934)
 * The use case is that I have a site with 8 languages and I only wanted the popup
   to show up on one language.
 * What we could do now is to add the possibility to translate the popup so we can
   display it on multiple languages in the right language… But that’s another story.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Make plugin WPML aware’ is closed to new replies.

 * ![](https://ps.w.org/exit-popup/assets/icon-128x128.png?rev=1443992)
 * [Exit Popup](https://wordpress.org/plugins/exit-popup/)
 * [Support Threads](https://wordpress.org/support/plugin/exit-popup/)
 * [Active Topics](https://wordpress.org/support/plugin/exit-popup/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/exit-popup/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/exit-popup/reviews/)

## Tags

 * [multilang](https://wordpress.org/support/topic-tag/multilang/)

 * 5 replies
 * 2 participants
 * Last reply from: [anou](https://wordpress.org/support/users/anou/)
 * Last activity: [7 years ago](https://wordpress.org/support/topic/make-plugin-wpml-aware/#post-11582934)
 * Status: resolved