Commit Graph

6 Commits

Author SHA1 Message Date
18ddcd5e0a feat(07-01): add deadline and contact email to all notification emails
All three job notification emails (new submission, edit, deactivation) now include:
- Bewerbungsfrist (deadline) - formatted as DD.MM.YYYY
- Kontakt-E-Mail (contact email)

This provides administrators with complete information about each job posting.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-17 21:36:43 +09:00
90525cd0ea fix(07-01): fix timing issue in job notification emails
Moved job submission notifications from transition_post_status hook to custom ddhh_job_submitted/ddhh_job_edited hooks. This ensures metadata is saved before the email is sent, so location and type fields are populated correctly instead of showing "Nicht angegeben".

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-17 19:56:53 +09:00
e24b4fa7f0 feat(06-03): add job publish hook to schedule mentor notifications
Add notify_mentors_on_job_publish() method to trigger async batch
notifications when jobs transition to publish status. Only triggers on
initial publish (not updates). Queries opted-in mentors via User
Preferences class and schedules batches via Scheduler class. Logs
notification scheduling with mentor count and batch count.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 21:08:23 +09:00
318e00e2f9 feat(05-02): add application notification to providers
Add send_provider_application_notification() method:
- Hooks to frm_after_create_entry for job application form submissions
- Extracts applicant details (name, email, message) and job_id
- Fetches job details (title, location, type) from post and ACF fields
- Sends email to provider contact email (job_contact_email ACF field)
- Email includes full applicant info and job context
- Provider can reply directly to applicant email
- Error logging for missing contact email or wp_mail failures

Hook registered in setup_hooks() method

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 20:30:14 +09:00
4a1c05c421 feat(04-02): add deactivation notification method to notifications class
- Added send_admin_job_deactivation_notification() method
- Hooks transition_post_status with guards: draft status AND old publish
- Extracts deactivation reason from ACF field job_deactivation_reason
- Email subject: "Stellenangebot deaktiviert: {job_title}"
- Email includes job details, provider info, and deactivation reason
- Sends to admin_email with edit link for review
- Error logging for missing admin_email or wp_mail failure

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 20:07:08 +09:00
7aeecae506 feat(03-03): create notification class with admin alert on job submission
- Created DDHH_JM_Notifications class with email notification system
- Hook into transition_post_status to detect new pending job submissions
- Send German email to admin with job details and edit link
- Email includes: title, author, org, location, type, date, edit link
- Only trigger on new → pending transition to avoid spam on updates
- Log errors if wp_mail() fails (common in Local WP)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 19:44:07 +09:00