You are here

function _webform_csv_headers_productfield in Commerce Webform 7

Same name and namespace in other branches
  1. 8 productfield.inc \_webform_csv_headers_productfield()
  2. 7.2 productfield.inc \_webform_csv_headers_productfield()

Implements _webform_csv_headers_component().

File

./productfield.inc, line 560

Code

function _webform_csv_headers_productfield($component, $export_options) {
  $options = $component['extra']['items'];
  $headers = array(
    0 => array(),
    1 => array(),
    2 => array(),
  );
  $headers[0][] = '';
  $headers[1][] = '';
  foreach ($options as $product_id => $details) {
    $headers[2][] = $details['sku'] . ': PAID';
    $headers[2][] = $details['sku'] . ': UNPAID';
  }
  return $headers;
}