Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
WC_API_Products::get_grouped_products_data( WC_Product $product )
Get grouped products data
Description Description
Parameters Parameters
- $product
-
(Required)
Return Return
(array)
Source Source
File: includes/legacy/api/v3/class-wc-api-products.php
private function get_grouped_products_data( $product ) { $products = array(); foreach ( $product->get_children() as $child_id ) { $_product = wc_get_product( $child_id ); if ( ! $_product || ! $_product->exists() ) { continue; } $products[] = $this->get_product_data( $_product ); } return $products; }
Changelog Changelog
Version | Description |
---|---|
2.5.0 | Introduced. |