Add scheduled periodic plain-text booking report email - #38
Open
datengraben wants to merge 1 commit into
Open
Conversation
Adds a weekly or monthly plain-text report that is emailed around 04:00 in the morning. The report lists the number of confirmed bookings (counted by booking start date) for the last 7 days, 30 days and 3 months, each compared against the immediately preceding period. - New Service\BookingReport builds the plain-text body and sends it via wp_mail(). The scheduler runs the job daily at 04:00 and the report is only sent on the configured interval (weekly on Mondays, monthly on the first of the month), since Scheduler only supports a fixed time of day for daily recurrence. - New Repository\Booking::countBookingsStartingInRange() counts confirmed bookings by their start date. - New settings in the Reminder tab: activate, interval (weekly/monthly) and recipient email (defaults to the site admin email). - Adds tests for the count query, report body and sending-day logic. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UCKGDj3J4aQTPefGhLsj1C
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.
Adds a weekly or monthly plain-text report that is emailed around 04:00
in the morning. The report lists the number of confirmed bookings
(counted by booking start date) for the last 7 days, 30 days and 3
months, each compared against the immediately preceding period.
wp_mail(). The scheduler runs the job daily at 04:00 and the report is
only sent on the configured interval (weekly on Mondays, monthly on the
first of the month), since Scheduler only supports a fixed time of day
for daily recurrence.
bookings by their start date.
and recipient email (defaults to the site admin email).
Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01UCKGDj3J4aQTPefGhLsj1C