Merge pull request #15775 from dixitadusara/issue/15772

issue solved Pass more params to woocommerce_duplicate_product_exclude_children filter
This commit is contained in:
Mike Jolley 2017-06-26 12:24:37 +01:00 committed by GitHub
commit 4972e83e51
1 changed files with 1 additions and 1 deletions

View File

@ -140,7 +140,7 @@ class WC_Admin_Duplicate_Product {
$duplicate->save();
// Duplicate children of a variable product.
if ( ! apply_filters( 'woocommerce_duplicate_product_exclude_children', false ) && $product->is_type( 'variable' ) ) {
if ( ! apply_filters( 'woocommerce_duplicate_product_exclude_children', false, $product ) && $product->is_type( 'variable' ) ) {
foreach ( $product->get_children() as $child_id ) {
$child = wc_get_product( $child_id );
$child_duplicate = clone $child;