An AffiliateWP customer wanted to know how to add some extra payment meta to the exported .csv file from Affiliates → Tools → Export Referrals. For each referral that the .csv listed, they needed to show the customer’s (who the affiliate referred) first name, last name and email address.

Although the code to retrieve the payment meta is specific to Easy Digital Downloads, you can use the reference ID to retrieve the payment meta from whichever e-commerce system you are using with AffiliateWP.

The code

Copy and paste the following code (mind the opening PHP tag) into your child theme’s functions.php or better yet, place this code into a custom plugin.


Comments are closed.