Add check-in for RSVPs - #2064
Open
wppoland wants to merge 4 commits into
Open
Conversation
display() emitted wp_nonce_field( Rsvp::COMMENT_TYPE ) before delegating to parent::display(), which emits core's bulk-<plural> nonce under the same default _wpnonce name. A browser sends both and PHP keeps the last, so the handler saw core's nonce, accepted neither of its two known actions, and returned early. Approve, Unapprove, Mark as Spam, Not Spam and Delete all did nothing, with no notice explaining why. process_bulk_action now accepts core's bulk nonce alongside the comment-type one, and the row-action nonce for delete as before. The comment-type field also moves to its own name so it can no longer shadow core's, the way the sibling action nonce already did.
Contributor
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Contributor
Test Coverage Report❌ Coverage checks need attention ❌ PHP Coverage✅ JavaScript CoverageThis comment is automatically updated on each push. |
…lk nonce - Delete the display() override: both hidden nonce fields it emitted are redundant now that process_bulk_action() accepts core's bulk-<plural> nonce. _gatherpress_rsvp_action_nonce was read by nothing; _gatherpress_rsvp_nonce duplicated core's _wpnonce on the same form. - Simplify nonce collection to read only _wpnonce, which every path (bulk form, view links, row-action delete) already carries. - Test: derive bulk-<plural> from the table args instead of hardcoding it; drop the now-obsolete gatherpress-nonce-field and display() tests.
An RSVP records who intended to come. Nothing recorded who turned up, so the gap between the two, which is the number organizers actually use afterwards, was not available anywhere. Check-In stores a GMT arrival timestamp in comment meta, so an absent value means not checked in and no existing RSVP needs backfilling. A repeated check-in keeps the first arrival time; clearing removes it. The count is scoped to approved RSVPs, matching the attendee list. The RSVPs screen gains a Checked in column and Check in / Clear check-in bulk actions, gated on the same capability as the moderation actions.
The spell checker reads "mis-tap" as a typo, and the constructor only runs during plugin bootstrap, so coverage never sees it. Resetting the stored instance lets the test build one inside the coverage window.
wppoland
force-pushed
the
feat/rsvp-check-in
branch
from
July 31, 2026 14:20
3de9df3 to
23c0959
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2061
Depends on #2063, and is branched on top of it: the check-in bulk actions are unreachable from a browser until that nonce fix lands. Happy to rebase onto
developonce it does, or to fold the two together if you would rather review one change.Proposed changes:
Rsvp\Check_Insingleton recording which RSVPs actually turned up, in agatherpress_checked_incomment meta holding the GMT arrival time. Absent means not checked in, so no existing RSVP needs backfilling and nothing changes for sites that never use it.Rsvp::CAPABILITYas the moderation actions.API, so nothing has to read the meta key directly:
check_in(),clear(),is_checked_in(),get_check_in_time(),count_checked_in(). Two actions,gatherpress_rsvp_checked_inandgatherpress_rsvp_check_in_cleared, both documented in the docblocks.Behaviour decisions, both raised in the issue:
count_checked_in()counts approved RSVPs only, matching what the attendee list shows.Deliberately out of scope here, as follow-ups if you want them: a block showing the checked-in count, a WP-CLI command, and per-attendee check-in from the event screen rather than the list.
Other information:
Test_Check_Inadds 8 tests covering hooks, recording an arrival, the repeated check-in case, clearing, both writers refusing non-RSVP comments and IDs that do not exist, the approved-only count, the delete sweep, and both actions.Test_List_Tablegains 3 more for the column in both states and the two bulk actions. Locally: 85 tests / 141 assertions green across those two classes, full suite unchanged at the 27 failures my single-site environment already produces on a clean checkout, PHPCS and PHPStan clean.Testing instructions:
moderate_comments, confirm the bulk actions are not offered.Verified by hand on WP 7.0.2 / PHP 8.2.29 with 0.35.0-beta.1: bulk check-in from the browser wrote
2026-07-30 10:05:48to both RSVPs,count_checked_in()returned 2, clearing removed both, anddebug.logstayed empty throughout.Credit (for release notes)
My WordPress.org username: motylanogha