Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"User" not reported correctly in Orders Export. #9715

Open
aristath opened this issue Mar 27, 2024 · 1 comment
Open

"User" not reported correctly in Orders Export. #9715

aristath opened this issue Mar 27, 2024 · 1 comment
Labels
type-bug workflow-needs-replication workflow-pending-triage Items that need to be triaged and reviewed before they are worked on.

Comments

@aristath
Copy link
Contributor

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:

$user_id = $order->id && $order->id != - 1 ? $order->id : $order->email;

That $user_id variable is then used to get the user using get_user_data():

$user = is_numeric( $user_id )
? get_userdata( $user_id )
: false;

As a result, it tries to get the user-data using the order-ID instead of the actual user-ID.

@aristath aristath added type-bug workflow-needs-replication workflow-pending-triage Items that need to be triaged and reviewed before they are worked on. labels Mar 27, 2024
@robincornett
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug workflow-needs-replication workflow-pending-triage Items that need to be triaged and reviewed before they are worked on.
Projects
None yet
Development

No branches or pull requests

2 participants