wc_update_300_grouped_products update routine needs to unset the post_parent on grouped products
Fixes #14507
This commit is contained in:
parent
372656d137
commit
5d7aa234b0
|
@ -1020,7 +1020,18 @@ function wc_update_300_grouped_products() {
|
|||
'post_type' => 'product',
|
||||
'fields' => 'ids',
|
||||
) );
|
||||
add_post_meta( $parent_id, '_children', $children_ids, true );
|
||||
update_post_meta( $parent_id, '_children', $children_ids );
|
||||
|
||||
// Update children to remove the parent.
|
||||
$wpdb->update(
|
||||
$wpdb->posts,
|
||||
array(
|
||||
'post_parent' => 0,
|
||||
),
|
||||
array(
|
||||
'post_parent' => $parent_id,
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue