Skip to content

Commit 88b0b02

Browse files
committed
Updated method of removing tables.
1 parent 1d7fd9b commit 88b0b02

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Search_Replace_Command.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,10 @@ public function __invoke( $args, $assoc_args ) {
275275

276276
// Get table names based on leftover $args or supplied $assoc_args
277277
$tables = \WP_CLI\Utils\wp_get_table_names( $args, $assoc_args );
278+
279+
// Removes from $tables tables provided by skip-tables argument
280+
$tables = array_diff( $tables, $this->skip_tables );
281+
278282
foreach ( $tables as $table ) {
279283

280284
if ( in_array( $table, $this->skip_tables ) ) {

0 commit comments

Comments
 (0)