Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $p = wc_get_product($product_id);
- $children = $p->get_children();
- foreach ($children as $child_id) {
- $child = wc_get_product($child_id);
- echo $child->get_name();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement