Skip to content

Editing unconfirmed tickets clears the username. #1420

@StevenDufresne

Description

@StevenDufresne

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.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions