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

Amend listener for RSVP date start/end #3573

Merged
merged 3 commits into from
Feb 19, 2025

Conversation

dpanta94
Copy link
Member

@dpanta94 dpanta94 commented Feb 19, 2025

Continuing work of PRs:

  1. Feat/ticket actions #3532
  2. Ticket stock listener will send pre and post update values #3551

I noticed that the RSVP would not create start/end actions during its initial creation. That was because for our code, the WP_Post that would was created it was not yet a Ticket_Object.

So i am sending every request to sync RSVP dates to be performed during the request's end.

The conditionals being removed are already happening in sync_ticket_dates_actions - so the only thing that is affected by said change is that more IDs would be eligible for date sync during the request's end. But they will be correctly be filtered based on if they are Tickets or not.

Why wasn't that caught by tests?

The reason is simple: order of meta keys is different for tests vs production.

see in tests:

'_tribe_rsvp_for_event' => $post_id,

_tribe_rsvp_for_event key comes before start/end dates, while in production comes later.

As a result our load_ticket_object method would fail here because an event would not be found for the ticket in production, but in tests would!

@dpanta94 dpanta94 self-assigned this Feb 19, 2025
@dpanta94 dpanta94 added the code review Status: requires a code review. label Feb 19, 2025
@dpanta94 dpanta94 requested a review from a team February 19, 2025 14:57
@dpanta94 dpanta94 requested a review from lucatume February 19, 2025 15:04
Copy link
Member

@Camwyn Camwyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trait needs a docblock.

@Camwyn
Copy link
Member

Camwyn commented Feb 19, 2025

Trait needs a docblock.

No, that's in tests, nvm

@dpanta94 dpanta94 merged commit ab5a22c into bucket/waitlists Feb 19, 2025
18 checks passed
@dpanta94 dpanta94 deleted the fix/listener-for-RSVP-dates branch February 19, 2025 15:21
@dpanta94 dpanta94 removed the code review Status: requires a code review. label Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants