easy-digital-downloads
easy-digital-downloads copied to clipboard
"User" not reported correctly in Orders Export.
Bug Report
Expected behavior
The User column in the generated CSV file should correspond to the user. Right now it does not.
Actual behavior
The order-ID is used instead of the user ID to get the user details.
The error seems to be in this line: https://github.com/awesomemotive/easy-digital-downloads/blob/e1d9abaa3fbd1d2d1b076a98a9c8420c5aa86c00/includes/admin/reporting/export/class-batch-export-payments.php#L119
That $user_id variable is then used to get the user using get_user_data():
https://github.com/awesomemotive/easy-digital-downloads/blob/e1d9abaa3fbd1d2d1b076a98a9c8420c5aa86c00/includes/admin/reporting/export/class-batch-export-payments.php#L184-L186
As a result, it tries to get the user-data using the order-ID instead of the actual user-ID.
Thank you for reporting this @aristath--I've confirmed your report and have logged it.
Closing this as this was fixed in EDD 3.3.0.