Overview of the Issue
If you are using WPML with Redis Object Cache plugin, you might encounter a problem where the Theme & Plugin Localization scan only localizes new strings after clearing the object cache manually. Specifically, when you delete a string from WPMLString Translation page, and scan the theme again, the deleted string doesn’t get re-added to String Translation unless you clear the Redis Object Cache first.
Workaround
This issue is fixed in WPML 4.9. Updating solves it on your site, so you only need this workaround if you can’t update yet.
Please, make sure of having a full backup of your site before proceeding.
- Open your theme’s functions.php file.
- Add the following line:
//workaround compsupp-7057 add_action( 'wpml_st_before_remove_strings', 'wp_cache_flush' );