WC_Product_CSV_Exporter::get_column_value_grouped_products( WC_Product $product )
Get grouped_products value.
Description Description
Parameters Parameters
- $product
-
(Required) Product being exported.
Return Return
(string)
Source Source
File: includes/export/class-wc-product-csv-exporter.php
protected function get_column_value_grouped_products( $product ) { if ( 'grouped' !== $product->get_type() ) { return ''; } $grouped_products = array(); $child_ids = $product->get_children( 'edit' ); foreach ( $child_ids as $child_id ) { $child = wc_get_product( $child_id ); if ( ! $child ) { continue; } $grouped_products[] = $child->get_sku( 'edit' ) ? $child->get_sku( 'edit' ) : 'id:' . $child_id; } return $this->implode_values( $grouped_products ); }
Changelog Changelog
Version | Description |
---|---|
3.1.0 | Introduced. |