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:
commit
4972e83e51
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue