Skip to content

Commit

Permalink
Merge pull request woocommerce#15783 from woocommerce/fix/15770
Browse files Browse the repository at this point in the history
After duplicating variations, ensure the duplicated object is current
  • Loading branch information
claudiosanches authored Jun 26, 2017
2 parents cb0abd5 + 372d7f6 commit 1fb11d0
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 1fb11d0

Please sign in to comment.