Add filter/action hooks for admin-extensible booking process#12
Open
datengraben wants to merge 3 commits into
Open
Add filter/action hooks for admin-extensible booking process#12datengraben wants to merge 3 commits into
datengraben wants to merge 3 commits into
Conversation
Introduces eight new WordPress hooks so plugin developers can intercept and extend the booking flow without patching core files: Filter hooks - commonsbooking_booking_form_fields – inject HTML into the initial booking form (step 1) - commonsbooking_booking_confirmation_fields – inject HTML into the confirm/cancel form (step 2) - commonsbooking_booking_redirect_url – override the post-creation redirect (enables intermediate pages) - commonsbooking_booking_meta_input – filter the meta saved when a new booking is inserted Action hooks - commonsbooking_booking_pre_validate – run custom validation before booking rules; throw BookingDeniedException to block - commonsbooking_booking_created – fires after a new unconfirmed booking is created - commonsbooking_booking_confirmed – fires after a booking is transitioned to confirmed - commonsbooking_save_booking_meta – fires on every booking form submission; persist custom $_REQUEST fields here Each hook is documented with phpdoc, a since tag, and a usage example. https://claude.ai/code/session_01XgmCDQJdsHhoRfErjoZKNe
Current release is 2.10.10; new hooks should reference the next version. https://claude.ai/code/session_01XgmCDQJdsHhoRfErjoZKNe
Adds a dedicated "Booking process hooks (since 2.10.11)" section to both
the English and German hooks-and-filters documentation pages, covering
all 8 new hooks with parameter tables and usage examples:
Filters: commonsbooking_booking_form_fields,
commonsbooking_booking_confirmation_fields,
commonsbooking_booking_redirect_url,
commonsbooking_booking_meta_input
Actions: commonsbooking_booking_pre_validate,
commonsbooking_booking_created,
commonsbooking_booking_confirmed,
commonsbooking_save_booking_meta
Also adds the new hooks to the existing overview lists in both languages.
https://claude.ai/code/session_01XgmCDQJdsHhoRfErjoZKNe
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.
Introduces eight new WordPress hooks so plugin developers can intercept
and extend the booking flow without patching core files:
Filter hooks
Action hooks
Each hook is documented with phpdoc, a since tag, and a usage example.
https://claude.ai/code/session_01XgmCDQJdsHhoRfErjoZKNe