The WP e-Commerce dashboard plugin features a flexible sales export that allows you to export either summary order information, or detailed line-item exports.

The information available on these exports is tailored to the type of information being exported. For example the order export doesn’t allow you to include SKU, or item price detail since there would be multiple values per order. Likewise, out-of-the box, the detail level export doesn’t let you include summary information since the fields would be repeated for each order line.

Sometimes though, you may want to repeat order-level information on the order lines. A good example is order notes which might be used by delivery staff, and the duplication doesn’t matter compared to the convenience of having item, and delivery notes together. Fortunately it’s easy to change which extract types fields are available on by  attaching to the filter ses-wpscd-csv-fields-available. Here’s an example making the “order notes” field available on line level exports, as well as summary exports.

function change_order_note_export_field($fields) {
    $fields['order-notes']['ShowOn'] = 'Both';
    return $fields;
add_filter('ses-wpscd-csv-fields-available', 'change_order_note_export_field', 10, 2);

Simply add that code to your theme’s functions.php file, or a site-specific plugin.

This entry was posted in .
Bookmark the permalink.