Support

Home Forums Event Espresso Premium Rearranged output

Rearranged output

Posted: October 25, 2017 at 5:43 am

Viewing 2 reply threads


sosfirstaid.ca

October 25, 2017 at 5:43 am

Hi, we are attempting to adjust the field output of the data being received so we can ensure the most fundamental values are received first in the CSV field order. What would be the best method to do this? I have a team of staff that can support whatever may be required, including custom development in WordPress; we don’t wish to change anything involved with the plugin(s) themselves, just merely adjust the output. Your help is greatly appreciated.
Thanks,


Tony

  • Support Staff

October 25, 2017 at 9:21 am

Hi there,

So you just want to output the CSV export in a specific order?

If so you can use this snippet as a base: https://gist.github.com/Pebblo/d6cec7c4a1ff75e818097665108556fa

The fields (and the order they are in) within $allowed_fields_in_order will be the order used for the CSV.

You can add that to a Custom Functions Plugin on your site (along with any other custom functions).


Tony

  • Support Staff

October 25, 2017 at 9:34 am

Actually, my apologies.

Josh pointed out that your using EE3 rather than EE4 so the above won’t work for you.

With EE3 the function that is used to output the CSV is ‘pluggable’ which means you can replace it with your own version and set the order however you prefer.

You’ll need to look within \event-espresso\includes\functions\export.php

The export function for the attendees is the espresso_export_stuff() function.

You can create a file called custom_functions.php, copy that function into there and edit the code there, then place that file within /wp-content/uploads/espresso/

That function will then be used in place of the original, you developer should be able to follow the code used there to alter the output to suit.

If you have any questions please do let me know.

Viewing 2 reply threads

The support post ‘Rearranged output’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso