Skip to content

Groups: store check-ins in GatherPress's check-in flag - #2231

Merged
bor0 merged 1 commit into
productionfrom
groups/gatherpress-check-in-flag
Oct 22, 2026
Merged

bor0 merged 1 commit into
productionfrom
groups/gatherpress-check-in-flag

Conversation

@bor0

@bor0 bor0 commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Fixes #2213.

Check-ins now live in GatherPress's own Check_In flag instead of our wporg_groups_checked_in comment meta, so the event page and the wp-admin RSVPs screen show and change the same thing.

  • A hook on gatherpress_rsvp_flag_added/_removed keeps our per-date check-in scopes in step, so a wp-admin check-in also switches "attended" over.
  • The check-in time is dropped. The flag has no time, and nothing read it.
  • Walk-ins without an account stay ours.
  • wp wc-groups-check-ins scan|migrate moves existing check-ins. It's a one-off; delete it once run.

Deploy

After deploying, on the events network:

wp --url=events.wordpress.org wc-groups-check-ins scan --verbose
wp --url=events.wordpress.org/group/<slug>/ wc-groups-check-ins migrate --dry-run
wp --url=events.wordpress.org/group/<slug>/ wc-groups-check-ins migrate

Group sites are two path segments deep, so --url needs a --require that returns 2 from site_by_path_segments_count. Until migrate runs on a site, its old check-ins don't show.

Testing

  1. On a past event, open Check in attendees and check someone in.
  2. wp-admin → Events → RSVPs for that event. Checked in reads "Yes".
  3. Bulk-action Check in another RSVP there.
  4. Back on the event, the modal shows both checked in, and Attended lists both.
  5. Seed wporg_groups_checked_in on an RSVP, run scan, migrate --dry-run, migrate, then migrate again (nothing left).
  • phpunit, full: 2862 passing (9 skipped)
  • phpcs clean
  • Steps 1-5 locally on GatherPress 0.36.0

Screenshots

Description Screenshot
Checked in from the event page 1-checked-in-from-page
wp-admin shows it 2-wp-admin-shows-it
Checked in from wp-admin 3-wp-admin-bulk-check-in
Event page shows the wp-admin check-in 4-page-shows-wp-admin-check-in

🤖 Generated with Claude Code

GatherPress 0.36.0 has its own check-in, shown and changed on the
wp-admin RSVPs screen. Ours lived in a comment meta, so neither side saw
the other's check-ins.

Read and write the `Check_In` flag instead. A hook on GatherPress's
flag added/removed actions keeps our per-date check-in scopes in step,
so a check-in made in wp-admin also switches "attended" over.

`sync_scope()` filters the event's RSVPs by the flag in PHP rather than
with a `tax_query`: `WP_Comment_Query` keys its cache on its own query
vars only, so a `tax_query` query shares a cache entry with the same
query without it and GatherPress's RSVP list came back holding only the
checked-in RSVPs.

The check-in time is dropped. The flag has no time, and nothing read it.

`wp wc-groups-check-ins scan|migrate` moves existing check-ins onto the
flag, one site at a time, and is deleted once it has run.

Fixes #2213.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@bor0
bor0 marked this pull request as ready for review October 22, 2026 11:08
@bor0
bor0 merged commit 121198c into production Oct 22, 2026
6 checks passed
@bor0
bor0 deleted the groups/gatherpress-check-in-flag branch October 22, 2026 11:32
bor0 added a commit that referenced this pull request Oct 22, 2026
It ran across the groups network after #2231 deployed and found no
check-ins to move, so nothing is left for it to do.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.

Groups: store check-ins in GatherPress's check-in flag

1 participant