Skip to content

Commit

Permalink
After duplicating variations, ensure the duplicated object is current
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejolley committed Jun 26, 2017
1 parent d8cf1c8 commit 372d7f6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions includes/admin/class-wc-admin-duplicate-product.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ public function product_duplicate( $product ) {

$child_duplicate->save();
}

// Get new object to reflect new children.
$duplicate = wc_get_product( $duplicate->get_id() );
}

return $duplicate;
Expand Down

0 comments on commit 372d7f6

Please sign in to comment.