Skip to content

Commit 46c06d7

Browse files
committed
Fix for partial uninstall
1 parent 168d562 commit 46c06d7

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

src/Plugin_Language_Command.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,7 @@ public function uninstall( $args, $assoc_args ) {
557557
\WP_CLI::log( "Language '{$language_code}' for '{$plugin}' partially uninstalled." );
558558
$result['status'] = 'partial uninstall';
559559
++$errors;
560+
$this->clear_translation_files_cache( $dir );
560561
} elseif ( $had_one_file ) { /* $count_files_removed == 0 */
561562
\WP_CLI::log( "Couldn't uninstall language '{$language_code}' from plugin {$plugin}." );
562563
$result['status'] = 'failed to uninstall';

src/Theme_Language_Command.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,7 @@ public function uninstall( $args, $assoc_args ) {
576576
\WP_CLI::log( "Language '{$language_code}' for '{$theme}' partially uninstalled." );
577577
$result['status'] = 'partial uninstall';
578578
++$errors;
579+
$this->clear_translation_files_cache( $dir );
579580
} elseif ( $had_one_file ) { /* $count_files_removed == 0 */
580581
\WP_CLI::log( "Couldn't uninstall language '{$language_code}' from theme {$theme}." );
581582
$result['status'] = 'failed to uninstall';

0 commit comments

Comments
 (0)