WordPress at Your Fingertips
function is not described

WC_Product_CSV_Exporter::prepare_linked_products_for_export() protected WC 3.1.0

Prepare linked products for export.

{} It's a method of the class: WC_Product_CSV_Exporter{}

No Hooks.

Return

String.

Usage

// protected - for code of main (parent) or child class
$result = $this->prepare_linked_products_for_export( $linked_products );
$linked_products(int[]) (required)
Array of linked product ids.

Changelog

Since 3.1.0 Introduced.

Code of WC_Product_CSV_Exporter::prepare_linked_products_for_export() WC 5.9.0

protected function prepare_linked_products_for_export( $linked_products ) {
	$product_list = array();

	foreach ( $linked_products as $linked_product ) {
		if ( $linked_product->get_sku() ) {
			$product_list[] = $linked_product->get_sku();
		} else {
			$product_list[] = 'id:' . $linked_product->get_id();
		}
	}

	return $this->implode_values( $product_list );
}