Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the community forum?
All Topics
menzer

Woocommerce Order Items on Row when exporting

In Woocommerce orders each row is the actual order (obviously) with all the ordered product items listed on one row which is fine, but I am trying to split the items and put them on individual rows when exporting to csv, now I understand this is called admincolumnpro but I am sure I can manipulate the exporting process by running a foreach() using the value of the order number from lets say column 1 but I don’t know how to split it on to each row in the CSV file whilst keeping the order columns the same ie:

Order Export example:

order nunmber 1, order name 1, order date 1, order status 1, product 1, item meta 1 <— each product item on a new line
order nunmber 1, order name 1, order date 1, order status 1, product 2, item meta 2 <— each product item on a new line
order nunmber 1, order name 1, order date 1, order status 1, product 3, item meta 3 <— each product item on a new line

Any help on this would be appreciated, thank you.

2 weeks, 2 days ago
Stefan
Developer

We do have some hooks for our export feature, but unfortunately, none of them allows you to split a row into multiple rows. So I’m afraid we can’t help you with this use case at the moment.

2 weeks, 2 days ago
menzer

Hey Stephan thanks for the update, I know this is not recommended but could I intercept the admincolumnpro query and export using custom export code? Then add an additional export button to the page (for now)

2 weeks, 2 days ago
Stefan
Developer

Sorry but I don’t see an easy way for you to alter our query to hook into our export code.
Sure, in the end, there is probably something that can be done, but in this case, this basically means that you need to completely rewrite our Export feature. I really advise not to go that road!

2 weeks, 2 days ago

You must be logged in to reply to this topic.