Skip to content

Commit 391e876

Browse files
committed
first version, not tested yet
1 parent 356304e commit 391e876

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Taxonomy_Command.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,12 +239,11 @@ public function migrate( $args, $assoc_args ) {
239239

240240
$id = $id['term_taxonomy_id'];
241241
$posts = get_objects_in_term( $term->term_id, $args[1] );
242-
$term_order = 0;
243242

244243
foreach ( $posts as $post ) {
245244
$type = get_post_type( $post );
246245
if ( in_array( $type, $original_taxonomy->object_type ) ) {
247-
$values[] = $wpdb->prepare( "(%d, %d, %d)", $post, $id, $term_order );
246+
$values[] = $wpdb->prepare( "(%d, %d, %d)", $post, $id, 0 );
248247
}
249248

250249
clean_post_cache( $post );
@@ -270,7 +269,7 @@ public function migrate( $args, $assoc_args ) {
270269

271270
if ( ! empty( $clean_term_cache ) ) {
272271
$clean_term_cache = array_unique( array_values( $clean_term_cache ) );
273-
clean_term_cache ( $clean_term_cache, $new_tax );
272+
clean_term_cache ( $clean_term_cache, $args[2] );
274273
}
275274
}
276275

0 commit comments

Comments
 (0)