gpb-bookings-today-merge-tag.php: Added new snippet for displaying a service's bookings for the current day. - #1227
Open
SebastianWiz wants to merge 1 commit into
Open
gpb-bookings-today-merge-tag.php: Added new snippet for displaying a service's bookings for the current day.#1227SebastianWiz wants to merge 1 commit into
gpb-bookings-today-merge-tag.php: Added new snippet for displaying a service's bookings for the current day.#1227SebastianWiz wants to merge 1 commit into
Conversation
…all bookings for a service for the current day.
WalkthroughIntroduces a new PHP class that registers a Gravity Forms merge tag replacement. The merge tag {gpb_bookings_today:service_id[]} displays today's bookings for a specified service, fetching booking data, filtering by datetime range, and formatting output in HTML or plain text format. Changes
Sequence DiagramsequenceDiagram
participant GF as Gravity Forms
participant MTR as Merge Tag<br/>Replacement
participant BQ as Booking Query
participant Output as Formatted Output
GF->>MTR: gform_replace_merge_tags filter
MTR->>MTR: Parse merge tag syntax<br/>{gpb_bookings_today:service_id[id]}
MTR->>BQ: Fetch bookings for service<br/>within today's date range
BQ-->>MTR: Return bookings
MTR->>MTR: Filter to datetime-range<br/>bookings
MTR->>MTR: Format each booking line<br/>(time, customer, resources)
MTR->>MTR: Build title and output<br/>(HTML or plain text)
MTR->>Output: Return formatted bookings
Output-->>GF: Merge tag replaced
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Context
⛑️ Ticket(s): https://secure.helpscout.net/link/to/conversation
Summary
This snippet adds a new merge tag
{gpb_bookings_today:service_id[123]}for displaying a service's bookings for the current day.The output includes:
Example:
