Waiting for author
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 WPML > String 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
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' );
Flushing the whole WP cache is not a nice solution. Why not just removing the strings that are selected for deletion from the WP Cache, like suggested at https://wpml.org/de/forums/topic/deleting-string-translations-are-not-removed-from-wp-cache/?
We recommend this workaround as deleting strings is not a frequent task. However, if you feel confortable with that workaround, please use it carefully as it hasn’t been tested by our development team.