Uninstalling a plugin does not remove plugin language files
jennydupuy opened this issue · comments
Hey,
I have an installation of WP in french fr_FR.
I use wp-cli to install a plugin, for example duplicator.
I type wp plugin install duplicator
then wp language plugin install duplicator fr_FR
Then I uninstall duplicator by command wp plugin uninstall duplicator
I see in the wp-content/languages/plugins/ the files duplicator-fr_FR.mo and duplicator-fr_FR.po.
So I want delete them and I use :
wp language plugin uninstall duplicator fr_FR
but wp-cli respond: Warning: The 'fr_FR' language is active.
So I must activate an another language to uninstall the language files fr_FR:
wp site switch-language en_US
and type
wp language plugin uninstall duplicator fr_FR
Success: Language uninstalled
If I delete a plugin in the dashboard screen plugins, the language files of plugin are also deleted, even if the en_FR language is still enabled.
Why the wp-cli command wp plugin uninstall don’t make the same?
Thanks
Thanks for the report, @jennydupuy !
I've confirmed the bug:
- When a plugin is uninstalled through the web, its language files are removed.
- When a plugin is uninstalled with WP-CLI, the language files remain.
We should remove the language files too, to follow core behavior.