easy-digital-downloads icon indicating copy to clipboard operation
easy-digital-downloads copied to clipboard

"User" not reported correctly in Orders Export.

Open aristath opened this issue 1 year ago • 1 comments
trafficstars

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.

aristath avatar Mar 27 '24 09:03 aristath

Thank you for reporting this @aristath--I've confirmed your report and have logged it.

robincornett avatar Mar 27 '24 11:03 robincornett

Closing this as this was fixed in EDD 3.3.0.

mihaijoldis avatar Jul 27 '24 13:07 mihaijoldis