Following up from our last Store Exporter Deluxe snippet about Adding static Order fields to the Orders export type we will add a static Order Item field to the Orders export type.
The 3 different Order Items Formatting rules (combined, individual and unique) require different WordPress Filters to be accessed in order to correctly format the export. We will cover each Order Items Formatting option separately; starting with the simplest.
First let’s add the static Order Item field to the Order fields list before looking at each Order Items Formatting rule.
View CodePlace Order Items within a grouped single Order row (combined)
Add the following PHP snippet to your current WordPress Theme’s functions.php file:
View CodePlace each Order Item within their own Order row (individual)
Add the following PHP snippet to your current WordPress Theme’s functions.php file:
View CodePlace Order Items on individual cells within a single Order row (unique)
Add the following PHP snippet to your current WordPress Theme’s functions.php file:
View Code
Pingback: Adding static Order fields to the Orders export type | Visser Labs