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>
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>
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>
- 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>
- 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>