get_children() as $child_id) : $child_product = $product->get_child( $child_id ); if ( !$child_product->is_downloadable() || !$child_product->is_virtual() ) $all_products_are_downloadable = false; $grouped_products[] = array( 'product' => $child_product, 'availability' => $child_product->get_availability() ); endforeach; ?>