Posted: October 28, 2024 at 1:02 pm
Some years ago I installed a plugin I completed with the help of EE-Support (e.g. Tony) where I added some extra columns like that: function ee_exclude_custom_fields_from_export($reg_csv_array, $reg_row) { $event_id = $reg_row[ ‘Registration.EVT_ID’ ]; add_filter( ‘FHEE__EE_Export__report_registrations__reg_csv_array’, ‘ee_exclude_custom_fields_from_export’, 100, 2 ); Now I need to add the name of the affiliate (from WP-Affiliate-Plugin) to the output of each row of the CSV export file (in case there is one connected to a ticket-booking) . Can You help me with that? |
|
Hi there, May I ask which part of the above are you struggling with? Grabbing an instance of awp can be done with:
Then is you have an instance of AWP, use it to pull in the referral based on the TXN_ID:
(The TXN_ID you can get form the reg_row. Then pull the details you need from the Is that what you are looking for? |
|
Hi Tony, thank you for your quick response which has been very helpful up to the following point. Sorry to bother you with that but I´m not able to pick out the referral_id from that resulting array in $referral. If You don´t mind would you please give me a tip? O:8:”stdClass”:19:{s:11:”referral_id”;s:2:”34″;s:12:”affiliate_id”;s:2:”13″;s:8:”visit_id”;s:3:”134″;s:7:”rest_id”;s:0:””;s:11:”customer_id”;s:1:”0″;s:9:”parent_id”;s:1:”0″;s:11:”description”;s:15:”WAB, |
|
It’s not actually an array, it’s a stdClass by the looks of it so try:
|
|
Super! Thank You very much! |
|
You’re most welcome 🙂 |
|
You must be logged in to reply to this support post. Sign In or Register for an Account