To export individual Order Items per row, divided by quantity add the following PHP snippet to your current WordPress Theme’s functions.php file.
View CodeOverride the default order_items XML node in exports
By default all XML Order exports include a order_items node that contains that Order’s Order Items. You can override this to suit your store needs by adding the following PHP snippet to your current WordPress Theme’s functions.php file:
View CodeOverride the default store XML node in exports
By default all XML exports include an opening node called store. You can override this to suit your store needs by adding the following PHP snippet to your current WordPress Theme’s functions.php file:
View CodeInclude Quantity and Cost details in TM Extra Product Options columns
By default the Order export type includes the TM Extra Product Options value detail in the export column. To include the Quantity and Cost details that can also be assigned to an Order Item by TM Extra Product Options add the following PHP snippet to your current WordPress Theme’s functions.php file:
View CodeShow a unique Order Item row matching the Quantity value for each Order Item
By default the Order Items Formatting rule “Place each Order Item within their own Order row” places each unique Order Item on its own row. This PHP snippet will force a new Order Item row for each quantity of an Order Item which is ideal for grocers and bulk Orders, for instance:
An Order of 3 Big Apples and 6 Small Apples will generate 9 Order Item rows with a Order Item: Quantity of 1 applied to all Order Items.
View CodeAdding a custom Product filter to the Edit Scheduled Export screen
To add a new custom Product Filter to the Edit Scheduled Export screen add the following PHP snippet to your current WordPress Theme’s functions.php file:
View CodeAdding a custom Term Taxonomy-linked export field to the Users export type
To add a new Custom Term Taxonomy-linked export field to the Users export type in Store Exporter Deluxe add the following PHP snippet to your current WordPress Theme’s functions.php file replacing $term_taxonomy with the Custom Term Taxonomy name of your choosing:
View CodeAdding custom Order Item fields to the Order export type
This code snippet builds on Adding static Order Item fields to the Orders export type, now we will add a dynamic custom Order Item field to the Order export type. The custom Order Item meta that we want to export is saved against the Order Item with a meta name of “departure_date”. You can use Store Toolkit for WooCommerce to easily expose custom Order and Order Item meta assigned to Orders.
Note: You need to declare each of the different Order Items Formatting rules with the “unique” Order Items Formatting rule being the most complex, if you don’t use the “unique” rule then it can be ignored for simplicity.
View CodeFlush the Extra Product Options export fields Transient in Store Exporter Deluxe
By default Store Exporter Deluxe refreshes it’s list of known Extra Product Option (EPO) export fields hourly, you can force refresh this on demand by clicking “Refresh counts” from the Export Types section on the Quick Export screen but you may wish to do this programmatically. The following PHP snippet will clear the Transient and on the next screen refresh of the Quick Export screen this list will be re-generated.
Add the following PHP snippet to your Child Theme’s functions.php file:
View CodeOverride the default temp directory used for exports in Store Exporter Deluxe
By default Store Exporter Deluxe uses the PHP temp directory for generating export files but on some misconfigured WordPress sites the ‘temp’ directory needs to be adjusted (e.g. where the open_basedir restriction is in effect but a valid tmp path has not been set).
The exposed WordPress Filter woo_ce_sys_get_temp_dir allows us to override the default temp directory used by Store Exporter Deluxe for generating export files. Add the following PHP snippet to your Child Theme’s functions.php file:
View CodeThe We could not create a temporary export file in … ensure that WordPress can read and write files here and try again Troubleshooting resource expands further on this issue.