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

Editing unconfirmed tickets clears the username. #1420

Open
StevenDufresne opened this issue Oct 30, 2024 · 0 comments · May be fixed by #1421
Open

Editing unconfirmed tickets clears the username. #1420

StevenDufresne opened this issue Oct 30, 2024 · 0 comments · May be fixed by #1421
Assignees

Comments

@StevenDufresne
Copy link
Contributor

StevenDufresne commented Oct 30, 2024

Describe the bug

Original Thread: https://wordpress.slack.com/archives/C08M59V3P/p1730140369131709.

In order to allow users who purchased tickets before requiring wp.org accounts to edit their ticket, I removed the forced login in #1405.

However, that PR mistakenly didn't remove code that sets the user to the logged-in user for unconfirmed tickets.

How are tickets unconfirmed?

When a user purchases multiple tickets in one session, we create all the tickets but assign [[ unconfirmed ]] to the tix_username. Code in require-login.php looks for these unconfirmed tickets and provides a confirm registration interface that, when submitted, assigns the logged in user to the ticket being edited.

Since we no longer require login, this code is in a weird spot. Currently, when unconfirmed tickets are updated, the tix_username is emptied. This has downstream impact as other components rely on this meta value.

We have a few options:

  1. Remove the filter that assigns the ticket on form save.
    • This feels risky because it would probably lead to more filters needing to be commented out.
  2. Force users to login if the ticket is unconfirmed.
    • This is how the code expects things to be, we should probably go with this.

Expected behavior

The tix_username should not be empty.

@StevenDufresne StevenDufresne self-assigned this Oct 30, 2024
@StevenDufresne StevenDufresne linked a pull request Oct 30, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant