Posted: December 9, 2018 at 5:55 pm
https://eventespresso.com/topic/csv-export-of-event-custom-values-not-user-custom-values/ I got this to work but have not had success with getting advanced custom field values to export in the csv. Can you comment on this? Here is my code that works for custom fields: add_filter( ‘FHEE__EE_Export__report_registrations__reg_csv_array’, ‘espresso_add_meta_value_csv’, 10, 2); What should I change up for the advanced custom fields? I’ve tried the field names, but that did not seem to work very well… Where do I start with this? |
|
Hi there, Is that the full code? It appears to be missing a When you say it’s not working very well, what is actually happening with the export? |
|
That close bracket may have been the issue. I need to format this for ‘acf field’, not simply ‘custom fields’… can you help me model one field from acf fields into this syntax, then I can replicate and post and test.. thanks. |
|
What is the ACF field type? You can likely use get_field() however, the return type from that function depends on the field type in use. |
|
The only way I have used these area as shortcodes and they look like this: |
|
Ok, so are the fields just text fields? ACF allows for different field ‘types’: https://www.advancedcustomfields.com/resources/#field-types They are still just ‘custom fields’ but the way the data within them is formatted is different depending on the type and how you pull the info you need changes depending on the field type. If they are just text fields then the current code:
(Assuming ‘class_number’ is the field name and it is just a basic text field holding an int) Should just work, if not you’re going to need to do some extra work to pull the correct details from the field. |
|
Great. That is what I seek. You rock. |
|
Nope. Blew up the page. I am getting a http500 return. |
|
Post all of your code to a gist or pastebin so I can view it. Please don’t post the code directly in the forum as it adds formatting so I then can’t tell if it’s your code or the forum formatting. |
|
Note that none of the Advanced Custom Fields may begin with a numeral. |
|
The support post ‘CSV export of "advanced custom field" values’ 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.