WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WC_Product_CSV_Exporter::generate_row_data() protected WC 1.0

Take a product and generate row data from it for export.

Это метод класса: WC_Product_CSV_Exporter{}

Возвращает

Массив.

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->generate_row_data( $product );
$product(WC_Product) (обязательный)
WC_Product object.

Код WC_Product_CSV_Exporter::generate_row_data() WC 4.5.2

woocommerce/includes/export/class-wc-product-csv-exporter.php
<?php
protected function generate_row_data( $product ) {
	$columns = $this->get_column_names();
	$row     = array();
	foreach ( $columns as $column_id => $column_name ) {
		$column_id = strstr( $column_id, ':' ) ? current( explode( ':', $column_id ) ) : $column_id;
		$value     = '';

		// Skip some columns if dynamically handled later or if we're being selective.
		if ( in_array( $column_id, array( 'downloads', 'attributes', 'meta' ), true ) || ! $this->is_column_exporting( $column_id ) ) {
			continue;
		}

		if ( has_filter( "woocommerce_product_export_{$this->export_type}_column_{$column_id}" ) ) {
			// Filter for 3rd parties.
			$value = apply_filters( "woocommerce_product_export_{$this->export_type}_column_{$column_id}", '', $product, $column_id );

		} elseif ( is_callable( array( $this, "get_column_value_{$column_id}" ) ) ) {
			// Handle special columns which don't map 1:1 to product data.
			$value = $this->{"get_column_value_{$column_id}"}( $product );

		} elseif ( is_callable( array( $product, "get_{$column_id}" ) ) ) {
			// Default and custom handling.
			$value = $product->{"get_{$column_id}"}( 'edit' );
		}

		if ( 'description' === $column_id || 'short_description' === $column_id ) {
			$value = $this->filter_description_field( $value );
		}

		$row[ $column_id ] = $value;
	}

	$this->prepare_downloads_for_export( $product, $row );
	$this->prepare_attributes_for_export( $product, $row );
	$this->prepare_meta_for_export( $product, $row );
	return apply_filters( 'woocommerce_product_export_row_data', $row, $product );
}